olsak / OpTeX

OpTeX - LuaTeX format with extended Plain TeX macros
http://petr.olsak.net/optex/
35 stars 14 forks source link

Wrong size for math inside \mathbox #24

Closed cao- closed 3 years ago

cao- commented 3 years ago

Ckeck this, please

\fontfam[lm]

\def\textA{\mathbox{letter $x$}}
\def\textB{\mathbox{letter } x}
\def\triple#1{{#1}^{{#1}^{#1}}}

$$
\triple\textA
$$

$$
\triple\textB
$$

\bye

You should see that in the first case the letter $x$ isn't correctly chosen in the script and scriptscript variants, but it is just a rescalement of the text variant. If \fontfam is omitted, everything seems to work correctly.

olsak commented 3 years ago

I hope that the commit https://github.com/olsak/OpTeX/commit/77e8a05090a325b64c46fb0bc91804e2d9d1e189 solves this issue. Thanks for reporting.

cao- commented 3 years ago

I tested it and it seems fine now. Thank you.