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:
Ron Kok
2020-08-12 21:08:36 -07:00
committed by GitHub
parent 26e0a05221
commit 42cc5e507e
11 changed files with 73 additions and 7 deletions

View File

@@ -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();

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -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