mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 06:58:40 +00:00
Added support for bold italic symbols (#1011)
* added support for \boldsymbol * added \boldsymbol tests * added \boldsymbol screenshots * added \bm, snapshot, updated screenshots * updated snapshot for \boldsymbol * properly display \imath and 2 in boldsymbol * implemented \boldsymbol for + * fix typo, remove boldsymbolLetters hardcode * make comment about using Main-Bold more general * fixed trailing space CI error
This commit is contained in:
committed by
Kevin Barabash
parent
36ca9beaa7
commit
cf23517499
@@ -77,6 +77,46 @@ exports[`A MathML builder should make prime operators into <mo> nodes 1`] = `
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder should render boldsymbol with the correct mathvariants 1`] = `
|
||||
|
||||
<math>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mi mathvariant="bold-italic">
|
||||
A
|
||||
</mi>
|
||||
<mi mathvariant="bold-italic">
|
||||
x
|
||||
</mi>
|
||||
<mn mathvariant="bold-italic">
|
||||
2
|
||||
</mn>
|
||||
<mi mathvariant="bold-italic">
|
||||
k
|
||||
</mi>
|
||||
<mi mathvariant="bold-italic">
|
||||
ω
|
||||
</mi>
|
||||
<mi mathvariant="bold-italic">
|
||||
Ω
|
||||
</mi>
|
||||
<mi mathvariant="bold-italic">
|
||||
ı
|
||||
</mi>
|
||||
<mo mathvariant="bold-italic">
|
||||
+
|
||||
</mo>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<annotation encoding="application/x-tex">
|
||||
\\boldsymbol{Ax2k\\omega\\Omega\\imath+}
|
||||
</annotation>
|
||||
</semantics>
|
||||
</math>
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder should render mathchoice as if there was nothing 1`] = `
|
||||
|
||||
<math>
|
||||
|
@@ -75,4 +75,9 @@ describe("A MathML builder", function() {
|
||||
expect(getMathML(`x_{y_{\\mathchoice{D}{T}{S}{${cmd}}}}`))
|
||||
.toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should render boldsymbol with the correct mathvariants", () => {
|
||||
expect(getMathML(`\\boldsymbol{Ax2k\\omega\\Omega\\imath+}`))
|
||||
.toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
BIN
test/screenshotter/images/BoldSymbol-chrome.png
Normal file
BIN
test/screenshotter/images/BoldSymbol-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
test/screenshotter/images/BoldSymbol-firefox.png
Normal file
BIN
test/screenshotter/images/BoldSymbol-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@@ -57,6 +57,7 @@ BinCancellation: |
|
||||
\end{array}
|
||||
BinomTest: \dbinom{a}{b}\tbinom{a}{b}^{\binom{a}{b}+17}
|
||||
BoldSpacing: \mathbf{A}^2+\mathbf{B}_3*\mathscr{C}'
|
||||
BoldSymbol: \sum_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \boldsymbol{\omega}+ \int_{\boldsymbol{\alpha}}^{\boldsymbol{\beta}} \boldsymbol{\Omega}+\boldsymbol{Ax2k\omega\Omega\imath+}
|
||||
Boxed: \boxed{F=ma} \quad \boxed{ac}\color{magenta}{\boxed{F}}\boxed{F=mg}
|
||||
Cases: |
|
||||
f(a,b)=\begin{cases}
|
||||
|
Reference in New Issue
Block a user