Real Time LaTeX?

I recommend latexmk which, with -pvc switch (for "preview continuously"), will recompile (as many times as necessary) whenever the source changes. If you have a pdf viewer that autorefreshes the pdf view (Skim on Mac OSX does this) then you can see a refreshed preview every time you hit save.

Using latexmk is nice even without the -pvc option since it automatically compiles (including bibtex) as many times as necessary.

Added: How to set up latexmk and Skim for near realtime LaTeX

Added: Here's something similar to latexmk, written in python: http://iml.univ-mrs.fr/~beffara/soft/rubber/. It doesn't seem to have anything like the "preview continuously" option, though that could be added with something like this: https://stackoverflow.com/questions/393176/monitor-a-set-of-files-for-changes

Note to those railing against WYSIWYG:

Realtime previewing (like StackOverflow does!) does not mean WYSIWYG. WYSIWYG means hiding the source from you so that what you are editing appears like the final output. Which, yes, for technical writing is a terrible idea. Seeing a realtime preview does not make LaTeX WYSIWYG -- you are still editing the plain text source. (Note that this is the way the StackOverflow editor works.)

I don't dispute that you should not typically worry about the preview. You could even argue against this feature on the grounds that it would encourage bad habits. I would actually argue the opposite -- seeing the choices TeX is making in realtime just reassures you that you can put the typesetting out of your mind and have faith in TeX.

In any case, there are plenty of times when you do need to care (like with messy equations, or in the final stages of editing when you're cleaning up bad line breaks and whatnot) and a truly realtime preview would save a lot of time.


BaKoMa TeX does what you are looking for and is the only such solution that I know of. It does real incremental LaTeX compiling in the background, so it works with practically all LaTeX packages (e.g. those for complex diagrams). The LaTeX system itself is also quite good (e.g., it had early support for SVG).

It was originally only available for Windows, but nowadays there are also versions for Linux and Mac.

It is unfortunate that it is not free or open source, but for me paying the license fee is worth it. It is so superior to any other solution that I just can't imagine going back. As far as I know it is written by a single russian physicist, so I think the price is well justified.

Btw, I am not in any way connected to BaKoMa, just a very happy user.


Gummi is better than BaKoMa TeX. It is a free, open source, program written in python, featuring a live preview pane.

[ Edit: Gummi is currently maintained here: https://github.com/alexandervdm/gummi ]

picture of gummi

Tags:

Compiling