a simple file watcher for latex auto-compiling
A (very) simple latex file watcher to auto-compile tex files.
- You will need node.js version >= 0.8 (check with
- Install latex-watcher using npm:
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:
- cleanup (removes temporary latex files after compilation)
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.