Added ability to create a dashed vertical line in arrays, using ':' (#1395)

* hacked together a dashed vertical bar

* Updated tests and spec.

* tidied up the screenshot template for arrays

* added the vertical lines at the end back

* Updated screenshots for arrays
This commit is contained in:
Zachary Riedlshah
2018-06-04 11:52:30 +12:00
committed by Kevin Barabash
parent fcb32f058b
commit 4492eedb68
6 changed files with 24 additions and 3 deletions

View File

@@ -2324,7 +2324,7 @@ describe("An array environment", function() {
});
it("should accept vertical separators", function() {
const parse = getParsed("\\begin{array}{|l||c|}\\end{array}");
const parse = getParsed("\\begin{array}{|l||c:r::}\\end{array}");
expect(parse[0].type).toBe("array");
expect(parse[0].value.cols).toEqual([
{type: "separator", separator: "|"},
@@ -2332,7 +2332,10 @@ describe("An array environment", function() {
{type: "separator", separator: "|"},
{type: "separator", separator: "|"},
{type: "align", align: "c"},
{type: "separator", separator: "|"},
{type: "separator", separator: ":"},
{type: "align", align: "r"},
{type: "separator", separator: ":"},
{type: "separator", separator: ":"},
]);
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -33,7 +33,7 @@ Alignedat: |
3a &= 3 & 17b &= 34 &\quad 400c &= 1200
\end{alignedat}
Arrays: |
\left(\begin{array}{|rl|c||}
\left(\begin{array}{|rl:c||}
1&2&3\\
1+1&2+1&3+1\cr1\over2&\scriptstyle 1/2&\frac12\\[1ex]
\begin{pmatrix}x\\y\end{pmatrix}&0&\begin{vmatrix}a&b\\c&d\end{vmatrix}