feat: support {align}, {align*}, {alignat}, and {alignat*} (#2341)

* Support {align}, {align*}, {alignat}, and {alignat*}

* Specify display mode for screenshots

* Add bogus screenshots

* Some screenshotter progress

* Update screenshots
This commit is contained in:
Ron Kok
2020-07-28 08:02:08 -07:00
committed by GitHub
parent fb710f0f9a
commit 2f37dc9104
7 changed files with 48 additions and 21 deletions

View File

@@ -2726,25 +2726,26 @@ describe("An aligned environment", function() {
});
});
describe("A gather environment", function() {
describe("AMS environments", function() {
const nonStrictDisplay = new Settings({displayMode: true, strict: false});
it("should fail outside display mode", () => {
expect`\begin{gather}a+b\\c+d\end{gather}`.not.toParse(nonstrictSettings);
});
it("should fail outside display mode", () => {
expect`\begin{gather*}a+b\\c+d\end{gather*}`.not.toParse(nonstrictSettings);
expect`\begin{align}a&=b+c\\d+e&=f\end{align}`.not.toParse(nonstrictSettings);
expect`\begin{align*}a&=b+c\\d+e&=f\end{align*}`.not.toParse(nonstrictSettings);
expect`\begin{alignat}{2}10&x+ &3&y = 2\\3&x+&13&y = 4\end{alignat}`.not.toParse(nonstrictSettings);
expect`\begin{alignat*}{2}10&x+ &3&y = 2\\3&x+&13&y = 4\end{alignat*}`.not.toParse(nonstrictSettings);
});
it("should build if in display mode", () => {
it("should build if in non-strict display mode", () => {
expect`\begin{gather}a+b\\c+d\end{gather}`.toBuild(nonStrictDisplay);
});
it("should build if in display mode", () => {
expect`\begin{gather*}a+b\\c+d\end{gather*}`.toBuild(nonStrictDisplay);
expect`\begin{align}a&=b+c\\d+e&=f\end{align}`.toBuild(nonStrictDisplay);
expect`\begin{align*}a&=b+c\\d+e&=f\end{align*}`.toBuild(nonStrictDisplay);
expect`\begin{alignat}{2}10&x+ &3&y = 2\\3&x+&13&y = 4\end{alignat}`.toBuild(nonStrictDisplay);
expect`\begin{alignat*}{2}10&x+ &3&y = 2\\3&x+&13&y = 4\end{alignat*}`.toBuild(nonStrictDisplay);
});
});
describe("operatorname support", function() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -22,6 +22,9 @@ AccentsText: |
\text{\'A} & \text{\.A} & \text{\`A} & \text{\"A} & \text{\H{A}} & \text{\r{A}} \\
\text{\.I İ} & \text{\H e e̋} & \text{\i ı}
\end{array}
Align:
tex: \begin{align}a &= 1 & b &= 2 \\ 3a &= 3 & 17b &= 34\end{align}
display: 1
Aligned: |
\begin{aligned}
a &= 1 & b &= 2 \\