latex3 / tagpdf

Tagging support code for LaTeX
59 stars 7 forks source link

Missing spaces with lualatex #66

Closed krypt-n closed 1 year ago

krypt-n commented 1 year ago

From tex.stackexchange

In some cases when using tagpdf together with lualatex, some spaces are missing. A small example:

\DocumentMetadata{
    testphase=phase-I
}

\documentclass{article}

\begin{document}

$\{a\} \mbox{test}$
$\{a\} \mbox{ test}$
$\{a\}\ \mbox{test}$

\end{document}

Output with lualatex:

Screenshot 2023-02-08 at 17 03 54

(no space after the second pair of braces)

Output with pdflatex or without \DocumentMetadata:

Screenshot 2023-02-08 at 17 07 03

(a space after the second pair of braces, which I think is the expected behavior)

Edit: A smaller example that exhibits what I think is the same behavior:

\DocumentMetadata{
    testphase=phase-I
}

\documentclass{article}

\begin{document}

a \mbox{b} a \mbox{ b} a \mbox{b}

\end{document}
car222222 commented 1 year ago

I can confirm that this ouput shows the “correct” spaces.

Output with pdflatex or without \DocumentMetadata:

krypt-n commented 1 year ago

Using version 0.98d, it now works as I would expect. Thanks!