Support double-square curly braces (#1953)

* Support double-square curly braces

Signed-off-by: ice1000 <ice1000kotlin@foxmail.com>

* Rename `llbrace` to `lBrace`

* Address comments: add mathml

* Fix code style

* Fix doc

* Add to docs/support_table
This commit is contained in:
Tesla_Ice_Zhang
2019-04-25 10:23:00 -04:00
committed by Ron Kok
parent 2d066097ad
commit 6bb312f687
4 changed files with 14 additions and 1 deletions

View File

@@ -527,6 +527,7 @@ table td {
|\Large|$\Large Large$|`\Large Large`| |\Large|$\Large Large$|`\Large Large`|
|\LARGE|$\LARGE LARGE$|`\LARGE LARGE`| |\LARGE|$\LARGE LARGE$|`\LARGE LARGE`|
|\LaTeX|$\LaTeX$|| |\LaTeX|$\LaTeX$||
|\lBrace|$\lBrace$||
|\lbrace|$\lbrace$|| |\lbrace|$\lbrace$||
|\lbrack|$\lbrack$|| |\lbrack|$\lbrack$||
|\lceil|$\lceil$|| |\lceil|$\lceil$||
@@ -841,6 +842,7 @@ table td {
|\Rarr|$\Rarr$|| |\Rarr|$\Rarr$||
|\rArr|$\rArr$|| |\rArr|$\rArr$||
|\rarr|$\rarr$|| |\rarr|$\rarr$||
|\rBrace|$\rBrace$||
|\rbrace|$\rbrace$|| |\rbrace|$\rbrace$||
|\rbrack|$\rbrack$|| |\rbrack|$\rbrack$||
|\rceil|$\rceil$|| |\rceil|$\rceil$||

View File

@@ -56,7 +56,7 @@ See also [letters](#letters)
|$\vert$ <code>&#124;</code> |$\vert$ `\vert` |$┌ ┐$ `┌ ┐`|$\ulcorner \urcorner$ `\ulcorner`<br>$~~~~$`\urcorner` |$\Downarrow$ `\Downarrow` |$\vert$ <code>&#124;</code> |$\vert$ `\vert` |$┌ ┐$ `┌ ┐`|$\ulcorner \urcorner$ `\ulcorner`<br>$~~~~$`\urcorner` |$\Downarrow$ `\Downarrow`
|$\Vert$ <code>&#92;&#124;</code> |$\Vert$ `\Vert` |$└ ┘$ `└ ┘`|$\llcorner \lrcorner$ `\llcorner`<br>$~~~~$`\lrcorner` |$\Updownarrow$ `\Updownarrow` |$\Vert$ <code>&#92;&#124;</code> |$\Vert$ `\Vert` |$└ ┘$ `└ ┘`|$\llcorner \lrcorner$ `\llcorner`<br>$~~~~$`\lrcorner` |$\Updownarrow$ `\Updownarrow`
|$\lvert~\rvert$ `\lvert`<br>$~~~~$`\rvert`|$\lVert~\rVert$ `\lVert`<br>$~~~~~$`\rVert` |`\left.`| `\right.` |$\backslash$ `\backslash` |$\lvert~\rvert$ `\lvert`<br>$~~~~$`\rvert`|$\lVert~\rVert$ `\lVert`<br>$~~~~~$`\rVert` |`\left.`| `\right.` |$\backslash$ `\backslash`
|$\lang~\rang$ `\lang`<br>$~~~~$`\rang`|$\lt~\gt$ `\lt \gt`|$⟦~⟧$ `⟦ ⟧`|$\llbracket~\rrbracket$ `\llbracket`<br>$~~~~$`\rrbracket`| |$\lang~\rang$ `\lang`<br>$~~~~$`\rang`|$\lt~\gt$ `\lt \gt`|$⟦~⟧$ `⟦ ⟧`|$\llbracket~\rrbracket$ `\llbracket`<br>$~~~~$`\rrbracket`|$\lBrace~\rBrace$ `\lBrace \rBrace`
**Delimiter Sizing** **Delimiter Sizing**

View File

@@ -849,6 +849,16 @@ defineMacro("\\rrbracket", "\\html@mathml{" +
defineMacro("\u27e6", "\\llbracket"); // blackboard bold [ defineMacro("\u27e6", "\\llbracket"); // blackboard bold [
defineMacro("\u27e7", "\\rrbracket"); // blackboard bold ] defineMacro("\u27e7", "\\rrbracket"); // blackboard bold ]
defineMacro("\\lBrace", "\\html@mathml{" +
"\\mathopen{\\{\\mkern-3.2mu[}}" +
"{\\mathopen{\\char`\u2983}}");
defineMacro("\\rBrace", "\\html@mathml{" +
"\\mathclose{]\\mkern-3.2mu\\}}}" +
"{\\mathclose{\\char`\u2984}}");
defineMacro("\u2983", "\\lBrace"); // blackboard bold {
defineMacro("\u2984", "\\rBrace"); // blackboard bold }
// TODO: Create variable sized versions of the last two items. I believe that // TODO: Create variable sized versions of the last two items. I believe that
// will require new font glyphs. // will require new font glyphs.

View File

@@ -3362,6 +3362,7 @@ describe("Unicode", function() {
expect`┌x┐ └x┘`.toBuild(); expect`┌x┐ └x┘`.toBuild();
expect("\u231Cx\u231D \u231Ex\u231F").toBuild(); expect("\u231Cx\u231D \u231Ex\u231F").toBuild();
expect("\u27E6x\u27E7").toBuild(); expect("\u27E6x\u27E7").toBuild();
expect("\\lBrace \\rBrace").toBuild();
}); });
it("should build some surrogate pairs", function() { it("should build some surrogate pairs", function() {