olsak / OpTeX

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

Phantom bigger than real #19

Closed cao- closed 3 years ago

cao- commented 3 years ago
\fontfam[lm]

$$\sqrt{\matrix{1 & 0 \cr 0 & 1}}$$

$$\sqrt{\phantom{\matrix{1 & 0 \cr 0 & 1}}}$$

\bye

The phantom expression has a bigger square root sign. As I understand \phantom, the square root sign should have the same size with and without \phantom.

cao- commented 3 years ago

Probably the size of the phantom expression is that of

$$\sqrt{\displaystyle\matrix{1 & 0 \cr 0 & 1}}$$
cao- commented 3 years ago

Besides, in plain TeX the matrix in

$$\sqrt{\matrix{1 & 0 \cr 0 & 1}}$$

is in displaystyle, while in OpTeX isn't. Is it intended?

olsak commented 3 years ago

Not, this was not intend. I didn't count rounding in \numexpr x/2. The intend is described at the bottom of page 23 in optex-math.pdf

cao- commented 3 years ago

Your commit fixed the problems, thank you!