2

I'm using pdf-view mode and the global auto-revert mode with LaTeX and latexmk. This works fine, except that, a couple of times during the compilation, the PDF is in a useless state and the PDF window shows raw data. I was wondering whether it is possible to detect these useless, unrenderable, states and dispense with the automatic reversion when they obtain. That is to say, whether it is possible to have PDF buffers reverted only when the PDF is renderable.

2
  • What mode do you use for LaTeX? If you use AUCTeX, you can stop using auto-revert-mode in the PDF buffers, and let AUCTeX refresh the pdfview buffer when compilation is finished.
    – Omar
    May 14, 2019 at 2:16
  • @Omar, I use AUCTeX and org babel.
    – Toothrot
    May 14, 2019 at 11:14

1 Answer 1

0

A workaround is to do make file.pdf && \mv file.pdf view-file.pdf and keep view-file.pdf open (auto-reverting) in emacs. The mv operation is "instant" so you don't see any partial file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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