mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
feat: Support \phase (#2406)
* Support \phase * Update screenshots * Update documentation * Add a11y test * Edit MathML notation to phasorangle * Move code to enclose.js Co-authored-by: Kevin Barabash <kevinb@khanacademy.org>
This commit is contained in:
@@ -2479,6 +2479,15 @@ describe("A actuarial angle builder", function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe("\\phase", function() {
|
||||
it("should fail in text mode", function() {
|
||||
expect`\text{\phase{-78.2^\circ}}`.not.toParse();
|
||||
});
|
||||
it("should not fail in math mode", function() {
|
||||
expect`\phase{-78.2^\circ}`.toBuild();
|
||||
});
|
||||
});
|
||||
|
||||
describe("A phantom parser", function() {
|
||||
it("should not fail", function() {
|
||||
expect`\phantom{x}`.toParse();
|
||||
|
BIN
test/screenshotter/images/Phase-chrome.png
Normal file
BIN
test/screenshotter/images/Phase-chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
test/screenshotter/images/Phase-firefox.png
Normal file
BIN
test/screenshotter/images/Phase-firefox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
@@ -318,6 +318,7 @@ Phantom: \begin{array}{l}
|
||||
\text{a \phantom{123}} b \hphantom{\frac{1}{2}}=c \vphantom{101112} d \\
|
||||
\sqrt{\mathstrut a} + \sqrt{\mathstrut d}
|
||||
\end{array}
|
||||
Phase: 120\text{V}\phase{-78.2^\circ}\;\Large\phase{78.2^\circ}
|
||||
Pmb: \mu\pmb{\mu}\pmb{=}\mu\pmb{+}\mu
|
||||
PrimeSpacing: f'+f_2'+f^{f'}
|
||||
PrimeSuper: x'^2+x'''^2+x'^2_3+x_3'^2
|
||||
|
Reference in New Issue
Block a user