[luatex] A bug in synctex code

luigi scarso luigi.scarso at gmail.com
Sat Sep 28 13:11:40 CEST 2024


On Sat, 28 Sept 2024 at 03:50, user202729--- via luatex <luatex at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20240928/0f4ec912/attachment.htm>


More information about the luatex mailing list.