A (very) simple latex file watcher to auto-compile tex files.
npm install -g latex-watcher
latex-watcherfrom your latex project directory. Check options below:
-c, --command list of commands to run. e.g latex,bibtex,pdflatex [required] [default: "pdflatex"] -t, --tex tex file to compile on changes [required] -b, --bib bib file used (required if bibtex is used)
The currently allowed commands are:
The command below compiles the
main.tex file with latex, then bibtex (using
main.bib), then latex again, then pdflatex every time any .tex files are changed, added or removed.
❯ node watch.js -c latex,bibtex,latex,pdflatex -t main -b main Watching latex ✓ bibtex ✓ latex ✓ pdflatex ✓
I've only tested and implemented this based on my own personal use. It currently works for me with Linux and OSX.