Open davidcarlisle opened 1 year ago
I'm not sure how best to fix this.
In the test, the nested math is just \hbox{$x$}
so the most efficient thing to do would be to do nothing so that as far as math font allocations go, the nested math just acts as if it were in the outer formula, so $x$
does nothing and if it did have \mathxxx
it would add to the mathalphabet count of the outer formula.
The alternative is to arrange that it effectively does a \mathversion
reset so the nested math has its own local math alphabet setup that then has to be restored at the end of the group. This has some cost overhead (especially as these things usually in \mathchoice
so get done 4 times), but would for example mean that you could use different \mathxx
in different array cells with each cell acting as a local math alphabet scope.
for bold symbols in #1028 / #1030 we reset the math version but there you are explicitly changing math version so the costs seem more reasonable.
I haven't actually got either strategy working as I'd like for the test case above but would be interested to know others thoughts on strategy.
This issue has been automatically marked as stale because it has not had recent activity.
This issue has been automatically marked as stale because it has not had recent activity.
This issue has been automatically marked as stale because it has not had recent activity.
related (extracted from https://tex.stackexchange.com/q/727625/2388)
\documentclass{article}
\DeclareSymbolFont{symbols1} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols2} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols3} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols4} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols5} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols6} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols7} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols8} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols9} {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{symbols10} {OMS}{cmsy}{m}{n}
\DeclareMathAlphabet{\pazocal}{OMS}{zplm}{m}{n} %
\begin{document}
$\mathsf{Enc} \mbox{$m$} \mbox{$\pazocal{M}$} $
\end{document}
Brief outline of the bug
https://tex.stackexchange.com/questions/689560/many-instances-of-declaresymbolfont-leads-to-odd-behavior
This is more or less the same issue as #1028 but without an explicit change of math version. After a nested math list, the local math alphabet assignments in the outer list are set incorrectly.
Minimal example showing the bug
Log file (required) and possibly PDF file
dd840.log