Fix argument font sizing in \fbox and \raisebox, fix font sizing in \TeX, \LaTeX, \KaTeX (#1787)

* Remove forced \normalsize in \raisebox

Fix #1786 (incorrect size of "E" in `\TeX`) by fixing `\raisebox` to
keep the current font size.  Previously, `\raisebox` was rendering its
second argument as if it were in `\normalsize\textrm{...}`; now,
the argument is just as if it were in `\textrm{...}`.

* Fix screenshots

* New "hbox" argument type to convert box-like arguments

* Review comments

* Fix \fbox to use hbox argument

* Render A in \LaTeX and \KaTeX in \scriptstyle (not \scriptsize)

* Add screenshot test

* Revert .sizing { width: min-content} thanks to #2044
This commit is contained in:
Erik Demaine
2019-07-18 11:24:00 -04:00
committed by Kevin Barabash
parent 2dc8f8121a
commit 9c7f26b479
12 changed files with 36 additions and 36 deletions

View File

@@ -618,9 +618,13 @@ exports[`A MathML builder should use <mpadded> for raisebox 1`] = `
<semantics>
<mrow>
<mpadded voffset="0.25em">
<mtext>
b
</mtext>
<mstyle scriptlevel="0"
displaystyle="false"
>
<mtext>
b
</mtext>
</mstyle>
</mpadded>
</mrow>
<annotation encoding="application/x-tex">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -160,7 +160,7 @@ Integrands: |
\iint + \oiint + \iiint + \oiiint
\end{array}
KaTeX:
tex: \KaTeX
tex: \KaTeX, \large \KaTeX
nolatex: \KaTeX not supported by LaTeX
Kern:
tex: \frac{a\kern{1em}b}{c}a\kern{1em}b\kern{1ex}c\kern{-0.25em}d
@@ -173,7 +173,7 @@ Kern:
# \mathrlap{\overbrace{\phantom{a_0+a_1+a_2}}^m}a_0+a_1+a_2
# \end{array}
LargeRuleNumerator: \frac{\textcolor{blue}{\rule{1em}{2em}}}{x}
LaTeX: \text{\LaTeX}, \text{\TeX}
LaTeX: \text{\LaTeX}, \text{\TeX}, \large \text{\LaTeX}, \text{\TeX}
LeftRight: \left( x^2 \right) \left\{ x^{x^{x^{x^x}}} \right.
LeftRightListStyling: a+\left(x+y\right)-x
LeftRightMiddle: \left( x^2 \middle/ \right) \left\{ x^{x^{x^{x^x}}} \middle/ y \right.\left(x\middle|y\,\middle|\,z\right)