Support Unicode double square brackets (#1750)

This commit is contained in:
Ron Kok
2018-10-23 23:57:36 -07:00
committed by ylemkimon
parent 89bb371152
commit 0b7b4db7fc
3 changed files with 14 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ See also [letters](#letters)
|$\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`
|$\lvert~\rvert$ `\lvert`<br>$~~~~$`\rvert`|$\lVert~\rVert$ `\lVert`<br>$~~~~~$`\rVert` |`\left.`| `\right.` |$\backslash$ `\backslash`
|$\lang~\rang$ `\lang`<br>$~~~~$`\rang`|$\lt~\gt$ `\lt \gt`|
|$\lang~\rang$ `\lang`<br>$~~~~$`\rang`|$\lt~\gt$ `\lt \gt`|$⟦~⟧$ `⟦ ⟧`|
**Delimiter Sizing**

View File

@@ -802,6 +802,18 @@ defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");
defineMacro("\\limsup", "\\DOTSB\\mathop{\\operatorname{lim\\,sup}}\\limits");
defineMacro("\\liminf", "\\DOTSB\\mathop{\\operatorname{lim\\,inf}}\\limits");
//////////////////////////////////////////////////////////////////////
// semantic
// The semantic package renders the next two items by calling a glyph from the
// bbold package. Those glyphs do not exist in the KaTeX fonts. Hence the macros.
defineMacro("\u27e6", "\\mathopen{[\\mkern-3.2mu[}"); // blackboard bold [
defineMacro("\u27e7", "\\mathclose{]\\mkern-3.2mu]}"); // blackboard bold ]
// TODO: Create variable sized versions of the last two items. I believe that
// will require new font glyphs.
//////////////////////////////////////////////////////////////////////
// texvc.sty

View File

@@ -3216,6 +3216,7 @@ describe("Unicode", function() {
expect("\\left\u23b0\\frac{a}{b}\\right\u23b1").toBuild();
expect`┌x┐ └x┘`.toBuild();
expect("\u231Cx\u231D \u231Ex\u231F").toBuild();
expect("\u27E6x\u27E7").toBuild();
});
it("should build some surrogate pairs", function() {