Re: [PATCH] Add "open Tex source file" support for evince



Hello, Nickolay,

SyncTeX and my patch are "two roads to Rome". 
While in my opinion, my patch is more concise and more efficient than SyncTex. :)

My patch is based on the native DVI standard, which was designed by David R. Fuchs in 1979. 
There are four special DVI opcodes XXX1~XXX4 (opcode number = 239~242). 
The corresponding TeX source location in the is stored in the DVI file as (opcode:239 arguments:"src 10 main.tex").
Since the information is stored inline, little amount of bytes are required.

SyncTeX puts the corresponding TeX source location in a file "main.synctex.gz", in which both the positions in the DVI file and the positions in the TeX source are stored. 
Therefore, a lot of bytes are required.

For example, I compiled "main.tex" by "latex --src-specials main.tex", and I got main.dvi(131,548 bytes)
Then I compiled "main.tex" by "latex -synctex=1 main.tex",
and I got main.dvi(128,524 bytes) main.synctex.gz(233,224 bytes).
Therefore, my patch requires less disk space.

Besides, my patch is concise, since there is already an interface which cope with DVI XXXi opcodes, in backend/dvi/mdvi-lib/special.c
Hence, my patch is shorter than the codes in
http://itexmac.sourceforge.net/SyncTeXPackage.zip

And my patch is efficient: The TeX position informations are attached onto DviContext only when the DVI file is loaded/reloaded. Just one linked-list is created in the PC memory, which stores "filename linenumber position". But in SyncTeX, a bunch of objects such as synctex_node_t, synctex_scanner_t are created, requiring more PC memory.

Cheers,
Homer

> Nickolay wrote:
> > Hello, everybody
> > 
> > The following patch add "open Tex source file" support
> for evince....
>
> Hi Gomer
> 
> Thanks for the patch, looks great. Can you please comment
> on the
> relation of this patch to the patch in the bug 
> 
> http://bugzilla.gnome.org/show_bug.cgi?id=543503


      



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]