Add symbol double square brackets (#1947)

* Add symbol double square brackets

* Update name for double square brackets, add macros and documentation
This commit is contained in:
Ben Dyer
2019-04-24 10:49:50 +09:00
committed by Ron Kok
parent 0461e17c8e
commit d01a972f5c
4 changed files with 17 additions and 6 deletions

View File

@@ -834,13 +834,20 @@ defineMacro("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
defineMacro("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
//////////////////////////////////////////////////////////////////////
// semantic
// stmaryrd and 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.
// The stmaryrd and semantic packages render the next four items by calling a
// glyph. 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 ]
defineMacro("\\llbracket", "\\html@mathml{" +
"\\mathopen{[\\mkern-3.2mu[}}" +
"{\\mathopen{\\char`\u27e6}}");
defineMacro("\\rrbracket", "\\html@mathml{" +
"\\mathclose{]\\mkern-3.2mu]}}" +
"{\\mathclose{\\char`\u27e7}}");
defineMacro("\u27e6", "\\llbracket"); // blackboard bold [
defineMacro("\u27e7", "\\rrbracket"); // blackboard bold ]
// TODO: Create variable sized versions of the last two items. I believe that
// will require new font glyphs.

View File

@@ -625,6 +625,8 @@ defineSymbol(math, main, open, "[", "\\lbrack");
defineSymbol(text, main, textord, "[", "\\lbrack");
defineSymbol(math, main, close, "]", "\\rbrack");
defineSymbol(text, main, textord, "]", "\\rbrack");
defineSymbol(math, main, open, "\u27e6", "\\llbracket", true);
defineSymbol(math, main, close, "\u27e7", "\\rrbracket", true);
defineSymbol(math, main, open, "(", "\\lparen");
defineSymbol(math, main, close, ")", "\\rparen");
defineSymbol(text, main, textord, "<", "\\textless"); // in T1 fontenc