synctex icon indicating copy to clipboard operation
synctex copied to clipboard

Kern nodes are corrupted in luatex output

Open dpantele opened this issue 10 months ago • 6 comments

When compiling a trivial doc

\documentclass{article}
\begin{document}

a\kern3pt b

\end{document}

we get the following synctex kern nodes in the .synctex file:

x1,4:10110238,8865054
k0,0:8799518,8865054:196608
x1,6:10671226,8865054
g1,5:31409438,8865054

kTAG,LINE:H,V:WIDTH

compare to pdflatex:

x1,4:10670937,8865054
k1,5:31409438,8865054:20738501
g1,5:31409438,8865054

pdflatex seems accurate, but luatex often produces huge numbers as tags and other attributes on longer files, as if there is some memory corruption.

dpantele avatar Apr 12 '24 16:04 dpantele

I guess it is present even in the reference test files: https://github.com/jlaurens/synctex/blob/9bc51bb1824aecef45791b8683ffd44c06cdc37a/synctex%20test%20files/test%20files/luatex/sample.synctex#L174

dpantele avatar Apr 12 '24 17:04 dpantele

Thanks for reporting.

I will report to the luatex developers in some near future, when enhancements to synctex are ready for the other engines. FYI, it concerns support of math surround space, more accurate line numbers for math nodes and box nodes, and a new \synctexmark feature to retrieve some information from the synctex file.

jlaurens avatar Apr 14 '24 06:04 jlaurens

Thanks! Another report about the same: https://tex.stackexchange.com/q/709094

New features looks promising.

Would it be feasible to actually enable tracking characters as well? Sycntex format supports that, but that is not implemented in any engine AFAIK. I am happy to open another issue if needed.

dpantele avatar Apr 15 '24 16:04 dpantele

Tracking characters must be properly defined. There are difficulties when compound characters come into play. Moreover, this leads to heavy calculation/storage.

jlaurens avatar Apr 19 '24 08:04 jlaurens

Wanted to check if kern nodes corruption was reported/discussed and if there was some resolution

dpantele avatar Aug 14 '24 22:08 dpantele

I have not reported any kern nodes corruption error yet. I you can, please report to luatex authors.

jlaurens avatar Sep 02 '24 17:09 jlaurens