3

I was wondering if LyX has an option whereby the PDF output file updates as I am making changes to the master file.

Werner
  • 603,163
ChinG
  • 229
  • This would be a wonderful feature to have and would save me a lot of time. –  Mar 24 '16 at 11:42

2 Answers2

4

No, there is to my knowledge no such thing.

You can use Instant preview (http://wiki.lyx.org/LyX/InstantPreview) for equations, and things you put inside a Preview box (Insert --> Preview), but I don't think there is an option for live updating the PDF.

Torbjørn T.
  • 206,688
2

No such functionality in LyX yet. But under Linux one can consider using command line tools to achieve that.

Suppose the LyX project file is called xx.lyx and we use pdflatex. The principle is to use entr to monitor the change of xx.lyx and export xx.lyx to xx.tex on any change, and use latexmk to instantly compile and update the PDF file. Two steps are involved:

  1. Open a terminal, cd into the LyX project folder and run

    ls xx.lyx | entr lyx -e pdflatex -f xx.lyx

  2. Open another terminal, cd into the LyX project folder and run

    latexmk -pvc -pdf xx.tex

Peng Liu
  • 21
  • 3
  • This seems really nice (I haven't tested it and don't use LyX so could skip the first step). But a couple of things: (i) shouldn't the second terminal use entr to compile the file when it changes? (ii) You should probably note that this will update the pdf when you save the file, not just when you make changes (a good thing IMO). – Chris H Oct 20 '16 at 10:36
  • I totally agree on (ii). Regarding (i): No, entr is not needed in the second terminal. Actually, latexmk detects any changes of xx.tex and its dependent files like figures. entr is used in the first terminal to monitor the change of xx.lyx. – Peng Liu Oct 20 '16 at 10:43
  • I didn't realise latexmk could monitor. I might have used it if I'd known that! – Chris H Oct 20 '16 at 11:00