On Sat, 28 Sept 2024 at 03:50, user202729--- via luatex <luatex@tug.org> wrote:
> Hi, > > It looks like there is a bug in the synctex code. Please take a look. > > (In particular, the node is a kern node but the macro assumes it's a glue > node. This gives incorrect values in the generated synctex file, with the > fix it gives correct values.) > > ``` > diff --git a/source/texk/web2c/synctexdir/synctex.c > b/source/texk/web2c/synctexdir/synctex.c > index b9b5d8a..c2fe83f 100644 > --- a/source/texk/web2c/synctexdir/synctex.c > +++ b/source/texk/web2c/synctexdir/synctex.c > @@ -2060,14 +2060,14 @@ static inline void > synctex_record_node_kern(halfword p) > # endif > if (SYNCTEX_SHOULD_COMPRESS_V) { > len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,=:%i\n", > - SYNCTEX_TAG_MODEL(p,glue), > - SYNCTEX_LINE_MODEL(p,glue), > + SYNCTEX_TAG_MODEL(p,kern), > + SYNCTEX_LINE_MODEL(p,kern), > SYNCTEX_CTXT_CURH UNIT, > SYNCTEX_WIDTH(p) UNIT); > } else { > len = SYNCTEX_fprintf(SYNCTEX_FILE, "k%i,%i:%i,%i:%i\n", > - SYNCTEX_TAG_MODEL(p,glue), > - SYNCTEX_LINE_MODEL(p,glue), > + SYNCTEX_TAG_MODEL(p,kern), > + SYNCTEX_LINE_MODEL(p,kern), > SYNCTEX_CTXT_CURH UNIT, > SYNCTEX_CTXT_CURV UNIT, > SYNCTEX_WIDTH(p) UNIT); > ``` > > Please take a look. Thank you. > > Ok, I will check it. -- luigi