\DocumentMetadata interferes with package option parsing
drs-p opened this issue · comments
Dear all,
This code:
\DocumentMetadata{
}
\documentclass[a4paper]{article}
\DeclareSymbolFont{operators}{OT1}{cmr}{bx}{n}
\usepackage[no-math]{fontspec}
\begin{document}
\[
2a + 3b = 4c
\]
\end{document}
fails on Lualatex: fontspec ignores the no-math
option and instead resets the maths setup, so that the digits in the equation are printed in regular weight rather than bold. However:
- the code works correctly on Xelatex
- the code works correctly without the call to
\DocumentMetadata
- the code also works correctly when I move the
no-math
option from the\usepackage
call to the\documentclass
call, i.e. when I make it a global option.
Since this error only occurs on Luatex and only with pdfmanagement-testphase, I thought its cause might be in the fontspec-luatex-tmp-ltx.sty file; but the error persists even when I overwrite that file with the original fontspec-luatex.sty.
This is on Ubuntu 20.04 with an up-to-date TL 2022.
Best regards,
Marc
hm, yes, it is a bug. And the reason is the file substituation with fontspec-luatex-tmp-ltx
, not the content but the substituation itself breaks the options. I will correct that, as a workaround use \DocumentMetadata{debug={firstaidoff=fontspec}}
.
this has been resolved in version 2023-03-09, 0.95x