mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
feat: Support \vcenter and \hbox (#2452)
* Support \vcenter, \raise, \lower, and \hbox * Update screenshots * Edit docs for strict and hbox to * Fix typo for \hbox to * Update Safari screenshot * Augment docs for \vcentcolon * Edit vcenter MathML comment. * Remove pointless class from vcenter MathML * Withdraw \raise and \lower * Updatae Chrome and Firefox screenshots * Update Safari screenshot * Delete allowedInArgument setting Co-authored-by: ylemkimon <y@ylem.kim> * Update Chrome and Firefox screenshots * Update Chrome and Firefox screenshots take 2 * Update screenshot Co-authored-by: ylemkimon <y@ylem.kim>
This commit is contained in:
@@ -456,7 +456,8 @@ use `\ce` instead|
|
||||
|\harr|$\harr$||
|
||||
|\hat|$\hat{\theta}$|`\hat{\theta}`|
|
||||
|\hbar|$\hbar$||
|
||||
|\hbox|<span style="color:firebrick;">Not supported</span>||
|
||||
|\hbox|$\hbox{$x^2$}$|`\hbox{$x^2$}`|
|
||||
|\hbox to <dimen>| <span style="color:firebrick;">Not supported</span> ||
|
||||
|\hdashline|$\begin{matrix}a&b\\ \hdashline c &d\end{matrix}$|`\begin{matrix}`<br> `a & b \\`<br> `\hdashline`<br> `c & d`<br>`\end{matrix}`|
|
||||
|\hearts|$\hearts$||
|
||||
|\heartsuit|$\heartsuit$||
|
||||
@@ -865,7 +866,7 @@ use `\ce` instead|
|
||||
|\R|$\R$||
|
||||
|\r|$\text{\r{a}}$|`\text{\r{a}}`|
|
||||
|\raise|<span style="color:firebrick;">Not supported</span>|see `\raisebox`|
|
||||
|\raisebox|$h\raisebox{2pt}{ighe}r$|`h\raisebox{2pt}{ighe}r`|
|
||||
|\raisebox|$h\raisebox{2pt}{ighe}r$|`h\raisebox{2pt}{$ighe$}r`|
|
||||
|\rang|$\langle A\rang$|`\langle A\rang`|
|
||||
|\rangle|$\langle A\rangle$|`\langle A\rangle`|
|
||||
|\Rarr|$\Rarr$||
|
||||
@@ -1176,8 +1177,9 @@ use `\ce` instead|
|
||||
|\vartriangleright|$\vartriangleright$||
|
||||
|\varUpsilon|$\varUpsilon$||
|
||||
|\varXi|$\varXi$||
|
||||
|\vcentcolon|$\vcentcolon$||
|
||||
|\vcenter|<span style="color:firebrick;">Not supported</span>||
|
||||
|\vcentcolon|$\mathrel{\vcentcolon =}$|`\mathrel{\vcentcolon =}`|
|
||||
|\vcenter|$a+\left(\vcenter{\frac{\frac a b}c}\right)$|`a+\left(\vcenter{\hbox{$\frac{\frac a b}c$}}\right)`<br>TeX (strict) syntax|
|
||||
|\vcenter|$a+\left(\vcenter{\frac{\frac a b}c}\right)$|`a+\left(\vcenter{\frac{\frac a b}c}\right)`<br>non-strict syntax|
|
||||
|\Vdash|$\Vdash$||
|
||||
|\vDash|$\vDash$||
|
||||
|\vdash|$\vdash$||
|
||||
|
@@ -236,11 +236,14 @@ In display math, KaTeX does not insert automatic line breaks. It ignores display
|
||||
|
||||
||||
|
||||
|:--------------|:----------------------------------------|:-----
|
||||
|$x_n$ `x_n` |$\stackrel{!}{=}$ `\stackrel{!}{=}` |$a \atop b$ `a \atop b`
|
||||
|$e^x$ `e^x` |$\overset{!}{=}$ `\overset{!}{=}` |$a\raisebox{0.25em}{b}c$ `a\raisebox{0.25em}{b}c`
|
||||
|$_u^o $ `_u^o `|$\underset{!}{=}$ `\underset{!}{=}` | $$\sum_{\substack{0<i<m\\0<j<n}}$$ `\sum_{\substack{0<i<m\\0<j<n}}`
|
||||
|$x_n$ `x_n` |$\stackrel{!}{=}$ `\stackrel{!}{=}`| $a \atop b$ `a \atop b`
|
||||
|$e^x$ `e^x` |$\overset{!}{=}$ `\overset{!}{=}` | $a\raisebox{0.25em}{$b$}c$ `a\raisebox{0.25em}{$b$}c`
|
||||
|$_u^o $ `_u^o `| $\underset{!}{=}$ `\underset{!}{=}` | $a+\left(\vcenter{\frac{\frac a b}c}\right)$ `a+\left(\vcenter{\hbox{$\frac{\frac a b}c$}}\right)`
|
||||
||| $$\sum_{\substack{0<i<m\\0<j<n}}$$ `\sum_{\substack{0<i<m\\0<j<n}}`
|
||||
|
||||
The second argument of `\raisebox` can contain math if it is nested within `$…$` delimiters, as in `\raisebox{0.25em}{$\frac a b$}`
|
||||
`\raisebox` and `\hbox` put their argument into text mode. To raise math, nest `$…$` delimiters inside the argument as shown above.
|
||||
|
||||
`\vcenter` can be written without an `\hbox` if the `strict` rendering option is *false*. In that case, omit the nested `$…$` delimiters.
|
||||
|
||||
### Overlap and Spacing
|
||||
|
||||
|
Reference in New Issue
Block a user