![pdfmanagement 和 lualatex 缺少空格](https://linux22.com/image/460967/pdfmanagement%20%E5%92%8C%20lualatex%20%E7%BC%BA%E5%B0%91%E7%A9%BA%E6%A0%BC.png)
在使用该包和 LuaLatex 时,我观察到在某些情况下会出现缺少空格的情况pdfmanagement-testphase
,但我不确定这是否是故意的。
这是一个演示该问题的小例子:
\DocumentMetadata{
testphase=phase-I
}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$\{a\} \text{test}$
$\{a\} \text{ test}$
$\{a\}\ \text{test}$
\end{document}
当使用 LuaLatex 处理示例时,我得到以下结果:
使用时也会发生这种情况testphase=phase-II
。但是,当我使用 pdfLatex 或不使用命令处理同一示例时
DocumentMetadata
,我得到了我期望的结果:
pdfmanagement-testphase
这是预期的行为,还是可能是一个错误?在使用和 luaLatex时有没有办法保留这个空间?
有关更多信息,请参阅 luaLatex 的输出:
This is LuaHBTeX, Version 1.15.0 (TeX Live 2022)
restricted system commands enabled.
(./test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-07>
(/usr/local/texlive/2022/texmf-dist/tex/latex/latex-lab/documentmetadata-suppor
t.ltx
(/usr/local/texlive/2022/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanage
ment-testphase.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty)
(/usr/local/texlive/2022/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanage
ment-testphase.ltx
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.
sty))))
(/usr/local/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(/usr/local/texlive/2022/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend
-testphase-luatex.def
(/usr/local/texlive/2022/texmf-dist/tex/latex/pdfmanagement-testphase/l3ref-tmp
.sty))
(/usr/local/texlive/2022/texmf-dist/tex/latex/latex-lab/phase-I-latex-lab-testp
hase.ltx (/usr/local/texlive/2022/texmf-dist/tex/latex/tagpdf/tagpdf.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def)
(/usr/local/texlive/2022/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty)))
(/usr/local/texlive/2022/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanage
ment-firstaid.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/pdfmanagement-testphase/output-pa
tches-tmp-ltx.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
Patching header in \@outputpage
Patching footer in \@outputpage
Patching \@makecol for tagging
Patching \@makecol for tagging
)) (/usr/local/texlive/2022/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/size10.clo))
(/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2022/texmf-dist/tex/latex/amsmath/amsopn.sty)) (./test.aux)
(/usr/local/texlive/2022/texmf-dist/tex/latex/base/ts1cmr.fd) [1{/usr/local/tex
live/2022/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux))
505 words of node memory still in use:
6 hlist, 2 vlist, 2 rule, 2 glue, 4 kern, 3 glyph, 10 attribute, 51 glue_spe
c, 8 attribute_list, 1 write nodes
avail lists: 1:1,2:62,3:24,4:6,5:22,6:2,7:94,8:8,9:38
</usr/local/texlive/2022/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.
otf></usr/local/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.p
fb></usr/local/texlive/2022/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pf
b>
Output written on test.pdf (1 page, 30029 bytes).
Transcript written on test.log.
答案1
这确实是 tagpdf 包中的一个错误(https://github.com/u-fischer/tagpdf/issues/66)。该错误已在 2023-02-15 发布的 tagpdf 0.98d 版本中修复。问题中的示例现在产生了预期的结果。