Bug 135098

Summary: Background compiling of LaTex documents
Product: [Applications] kile Reporter: Andreas Nicolai <Andreas.Nicolai>
Component: generalAssignee: Jeroen Wijnhout <spam>
Status: CONFIRMED ---    
Severity: wishlist CC: Andreas.Nicolai, lacsilva
Priority: NOR    
Version First Reported In: trunk-kde4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Andreas Nicolai 2006-10-04 16:54:48 UTC
Version:           1.9 (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
OS:                Linux

Since I'm a happy dual processor user now and compilation of my normal TeX documents takes only about 10-15 seconds, I think some kind of background compilation mode and a live-preview should be possible now.

I was thinking of something in the lines of:

At regular intervals or after a certain amount of changed text:
- create a backup copy of the current document
- run latex/pdftex in the background
- if compiling without error, update quick-preview window...

Has anybody thought of this before or is even working on that already?
Comment 1 Andreas Nicolai 2009-05-31 13:14:28 UTC
Particularly useful would be the rendering of math equations while typing. Suggested algorithm (if someone give's me some hands on help to get started, I could code it myself):
- in the editor mode, while typing, test if user is inside a math environment, for starters only the default environments $ $, $$ $$, \begin{equation} \end{equation}, ... etc. need to be supported, if user has custom environments, maybe those could be configured somewhere
- extract all text inside the environment into separate string buffer
- in scheduled intervals (suggest 2 sec. intervals) write temporary file with mini-latex-header
- run latex and create dvi/pdf etc.
- if successful, load dvi/pdf into math preview window, otherwise display some error message in window

Later, some sanity checking could be done while typing, to allow easier checking of faulty equations.
Comment 2 Luis Silva 2012-04-15 09:35:53 UTC
Fixed with the live-preview feature both incremental and on save.
See, e.g., Bug 297516.