mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
Edit \lbrack and \rbrack (#1420)
This commit is contained in:
@@ -219,12 +219,12 @@ const makeStackedDelim = function(
|
||||
top = "\\Uparrow";
|
||||
repeat = "\u2016";
|
||||
bottom = "\\Downarrow";
|
||||
} else if (delim === "[") {
|
||||
} else if (delim === "[" || delim === "\\lbrack") {
|
||||
top = "\u23a1";
|
||||
repeat = "\u23a2";
|
||||
bottom = "\u23a3";
|
||||
font = "Size4-Regular";
|
||||
} else if (delim === "]") {
|
||||
} else if (delim === "]" || delim === "\\rbrack") {
|
||||
top = "\u23a4";
|
||||
repeat = "\u23a5";
|
||||
bottom = "\u23a6";
|
||||
@@ -480,7 +480,7 @@ const makeSqrtImage = function(
|
||||
// There are three kinds of delimiters, delimiters that stack when they become
|
||||
// too large
|
||||
const stackLargeDelimiters = [
|
||||
"(", ")", "[", "]",
|
||||
"(", ")", "[", "\\lbrack", "]", "\\rbrack",
|
||||
"\\{", "\\lbrace", "\\}", "\\rbrace",
|
||||
"\\lfloor", "\\rfloor", "\u230a", "\u230b",
|
||||
"\\lceil", "\\rceil", "\u2308", "\u2309",
|
||||
|
@@ -36,7 +36,7 @@ const delimiterSizes = {
|
||||
};
|
||||
|
||||
const delimiters = [
|
||||
"(", ")", "[", "]",
|
||||
"(", ")", "[", "\\lbrack", "]", "\\rbrack",
|
||||
"\\{", "\\lbrace", "\\}", "\\rbrace",
|
||||
"\\lfloor", "\\rfloor", "\u230a", "\u230b",
|
||||
"\\lceil", "\\rceil", "\u2308", "\u2309",
|
||||
|
@@ -244,14 +244,10 @@ defineMacro("\\endgroup", "}");
|
||||
// Symbols from latex.ltx:
|
||||
// \def\lq{`}
|
||||
// \def\rq{'}
|
||||
// \def\lbrack{[}
|
||||
// \def\rbrack{]}
|
||||
// \def \aa {\r a}
|
||||
// \def \AA {\r A}
|
||||
defineMacro("\\lq", "`");
|
||||
defineMacro("\\rq", "'");
|
||||
defineMacro("\\lbrack", "[");
|
||||
defineMacro("\\rbrack", "]");
|
||||
defineMacro("\\aa", "\\r a");
|
||||
defineMacro("\\AA", "\\r A");
|
||||
|
||||
|
@@ -617,7 +617,9 @@ defineSymbol(text, main, textord, "}", "\\textbraceright");
|
||||
defineSymbol(math, main, open, "{", "\\lbrace");
|
||||
defineSymbol(math, main, close, "}", "\\rbrace");
|
||||
defineSymbol(math, main, open, "[", "\\lbrack");
|
||||
defineSymbol(text, main, textord, "[", "\\lbrack");
|
||||
defineSymbol(math, main, close, "]", "\\rbrack");
|
||||
defineSymbol(text, main, textord, "]", "\\rbrack");
|
||||
defineSymbol(text, main, textord, "<", "\\textless"); // in T1 fontenc
|
||||
defineSymbol(text, main, textord, ">", "\\textgreater"); // in T1 fontenc
|
||||
defineSymbol(math, main, open, "\u230a", "\\lfloor", true);
|
||||
|
Reference in New Issue
Block a user