feat: Support \underbar (#2713)

* feat: Support \underbar

* Update screenshots
This commit is contained in:
Ron Kok
2020-12-30 07:15:17 -08:00
committed by GitHub
parent cd9ee27ac6
commit 1f509a3b75
8 changed files with 7 additions and 2 deletions

View File

@@ -1123,6 +1123,7 @@ use `\ce` instead|
|\uArr|$\uArr$||
|\uarr|$\uarr$||
|\ulcorner|$\ulcorner$||
|\underbar|$\underbar{X}$|`\underbar{X}`|
|\underbrace|$\underbrace{x+⋯+x}_{n\text{ times}}$|`\underbrace{x+⋯+x}_{n\text{ times}}`|
|\underbracket|<span style="color:firebrick;">Not supported</span>||
|\undergroup|$\undergroup{AB}$|`\undergroup{AB}`|

View File

@@ -33,7 +33,7 @@ table td {
|$\ddot{a}$ `\ddot{a}` |$\underleftrightarrow{AB}$ `\underleftrightarrow{AB}`|$\underbrace{AB}$ `\underbrace{AB}`
|$\grave{a}$ `\grave{a}`|$\overline{AB}$ `\overline{AB}` |$\overlinesegment{AB}$ `\overlinesegment{AB}`
|$\hat{\theta}$ `\hat{\theta}`|$\underline{AB}$ `\underline{AB}` |$\underlinesegment{AB}$ `\underlinesegment{AB}`
|$\widehat{ac}$ `\widehat{ac}`|$\widecheck{ac}$ `\widecheck{ac}` |
|$\widehat{ac}$ `\widehat{ac}`|$\widecheck{ac}$ `\widecheck{ac}` |$\underbar{X}$ `\underbar{X}`
***Accent functions inside \\text{…}***

View File

@@ -377,6 +377,9 @@ defineMacro("\\clap", "\\mathclap{\\textrm{#1}}");
// \mathstrut from the TeXbook, p 360
defineMacro("\\mathstrut", "\\vphantom{(}");
// \underbar from TeXbook p 353
defineMacro("\\underbar", "\\underline{\\text{#1}}");
// \not is defined by base/fontmath.ltx via
// \DeclareMathSymbol{\not}{\mathrel}{symbols}{"36}
// It's thus treated like a \mathrel, but defined by a symbol that has zero

View File

@@ -2163,6 +2163,7 @@ describe("An accent parser", function() {
expect`\vec{x^2}`.toParse();
expect`\vec{x}^2`.toParse();
expect`\vec x`.toParse();
expect("\\underbar{X}").toParse();
});
it("should produce accents", function() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -13,7 +13,7 @@
# writing | (or >) as the first symbol of the value and then continuing
# on the next line. See http://www.yaml.org/ for syntax details.
Accents: \vec{A}\vec{x}\vec x^2\vec{x}_2^2\vec{A}^2\vec{xA}^2
Accents: \vec{A}\vec{x}\vec x^2\vec{x}_2^2\vec{A}^2\vec{xA}^2\; \underbar{X}
AccentsText: |
\begin{array}{lccccc}
\text{\'\i} & \text{\.\i} & \text{\`\i} & \text{\"\i} & \text{\H\i} & \text{\r\i} \\