Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there an equivalent to latexmk in Context? I want the script to watch my source files for changes and continuously recompile them.

Here is how I would do it with latexmk:

latexmk -bibtex -pdf -pvc document.tex

EDIT: I am on windows. Preferably this should be cross-platform (just like Context :-)

share|improve this question
Try the atchange program that is written in Perl and would work on Windows as well. –  Aditya Mar 6 '13 at 7:23

1 Answer 1

I don't know latexmk, but if you just want to trigger a new ConTeXt run if you modify the source file you can use inotify (assuming you use Linux). This mechanism is not ConTeXt related. Here's a simple example watching the file somefile.tex.

while inotifywait --event modify "$file"; do
  context --batchmode "$file"

You can also watch an entire directory tree, for instance if you use a project structure.

Edit: On MacOS and other BSDs the kqueue mechanism provides a similar functionality.

share|improve this answer
OSX also has filesystem events –  morbusg Mar 5 '13 at 13:48
No I am on windows :-( –  drozzy Mar 6 '13 at 4:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.