8

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 :-)

1
  • Try the atchange program that is written in Perl and would work on Windows as well.
    – Aditya
    Mar 6, 2013 at 7:23

1 Answer 1

10

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.

file='somefile.tex'
while inotifywait --event modify "$file"; do
  context --batchmode "$file"
done

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.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .