Bakoma is a LaTeX Editor which has the real-time preview on Windows. On Linux, one has Gummi which has a similar feature and on Windows, I use WinEdt with Sumatra PDF together with an AutoIt script to do this. When the .tex
is small, then both Gummi and my method gives 99.99% real-time preview feature, namely the delay between the typing and the appearance of updated PDF content is less then 0.5 second (even more, 0.2 second, I think). When the .tex
file gets bigger, the delay gets large also. Furthermore, because the frequent compiling, the CPU becomes much buiser.
But Bakoma has no such problems. Anybody knows how Bakoma can process .tex files so fast? Is it possible to make MikTeX or TexLive to speed up by the similar mechanic ?
Since someone ask the methods I mentioned, I need to share it by answering my own question, sorry.
First of all, for Gummi on Ubuntu:
After install Gummi, open /home/(user account name)/.config/gummi/gummi.cfg
Then change compile_timer
to 0, but keep compile_scheme = on_idle
. Now for small .tex files, you have real-time preview. Notice that if you change to compile_scheme = real-time
, then CPU becomes very busy even the .tex file is small.
For WinEdt + SumatraPDF + MiKTeX on Windows ( I use MiKTeX 2.9 on Windows 7 64-bit) :
In WinEdt, go
Options\Execution\Modes
. OnAccessories
, choosePDFLaTeX
. OnConsole Attributes
on the right side, chooseBackground Window
,Hidden Window
,WinEdt Console
but notPause / Do not Hide the Windo
. OnProcess Folw
, only selectNo Interaction
and pressOK
Open
C:\Program Files (x86)\WinEdt Team\WinEdt 6\Exec\ExeCompiler.edt
. Remove the following:
Prompt("Another Application is already running in WinEdt's Console.>
Terminate the application or wait for the execution to finish!");
Replace ShowConsole(1)
by ShowConsole(-1)
, there are 4 places to replace.
Replace FocusConsole(1);
by FocusConsole(-1);
, ther are 3 places to replace.
Save the file.
In WinEdt, go
Options\Options Interface
.On Menus and Toolbar
chooseMain Menu
. AddSHORTCUT="120::F9"
afterMACRO="Exe('%b\Exec\TeX\PDFLaTeX.edt');"
and addSHORTCUT="119::F8"
afterMACRO="SaveDoc;"
. Remember to remove the same shortcuts appear in the original file. Save the file and reload it.Install AutoIt. Create the following script
$size = FileGetSize("C:\test.tex") While 1 sleep(40) If WinActive("WinEdt 6.0", "C:\test.tex") Then Send("{F8}") $newsize = FileGetSize("C:\test.tex") If $newsize <> $size AND ProcessExists("pdflatex.exe") = 0 Then $size = $newsize Send("{F9}") EndIf EndIf WEnd
Then after running this script, when you edit your C:\test.tex
, you have the real-time preview. One can change the script to get the .tex filename you open, but I haven't done this yet.
Update:
Using the Forward search function, I get a function similar to "Auto Scroll in the viewer" in Gummi. Please check the demonstration video on youtube
autoit
to continuously compile the latex code in case of edits?Bakoma
to see if it worth to buy.