Upon opening a pdf in evince and then making a change to that document (recompiling it in LaTeX), evince will automatically refresh to the latest version of the document.

mupdf however does not do this: it keeps showing the version I originally opened. The latest version can be loaded with the r command, but is there a way to make mupdf behave like evince in that respect? The manual doesn’t mention this.


Poke mupdf with a HUP signal after the document changes (e.g. after recompiling it, or use entr or something to note the filesystem change)

pkill -HUP mupdf

or with more complication one might write an open-or-signal-mupdf script.

  • Thanks for your answer. Since I’m using latexmk (but didn’t mention it in the question), I now found this answer, which is exactly what I was looking for: superuser.com/questions/707483/… – Philipp Feb 22 '18 at 16:34

Adding a little to thrig's answer, this is what I came up with:

f=file.pdf; mupdf $f & while inotifywait -e close_write $f; do pkill -HUP mupdf; done

This will open a pdf file with mupdf and refresh whenever the pdf is written to.

the idea to use inotify came from this answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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