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



On 2009-05-10, Dongsheng Xing <homer xing yahoo com> wrote:
>
> 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.

OTOH, synctex is more general, in that it works with both dvi and pdf
files.  (I myself use pdf + synctex + evince + vim).

-Yozo




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