mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
Implement \colon as amsmath does (#1410)
* Implement \colon as amsmath does * Remove \colon from symbols.js * Update screenshots * Pick up comments * Replace screenshots
This commit is contained in:
@@ -289,6 +289,11 @@ defineMacro("\\varPhi", "\\mathit{\\Phi}");
|
||||
defineMacro("\\varPsi", "\\mathit{\\Psi}");
|
||||
defineMacro("\\varOmega", "\\mathit{\\Omega}");
|
||||
|
||||
// \renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
|
||||
// \mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
|
||||
defineMacro("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}" +
|
||||
"\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu");
|
||||
|
||||
// \newcommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}}
|
||||
defineMacro("\\boxed", "\\fbox{\\displaystyle{#1}}");
|
||||
|
||||
|
@@ -592,7 +592,6 @@ defineSymbol(math, main, spacing, null, "\\nobreak");
|
||||
defineSymbol(math, main, spacing, null, "\\allowbreak");
|
||||
defineSymbol(math, main, punct, ",", ",");
|
||||
defineSymbol(math, main, punct, ";", ";");
|
||||
defineSymbol(math, main, punct, ":", "\\colon");
|
||||
defineSymbol(math, ams, bin, "\u22bc", "\\barwedge", true);
|
||||
defineSymbol(math, ams, bin, "\u22bb", "\\veebar", true);
|
||||
defineSymbol(math, main, bin, "\u2299", "\\odot", true);
|
||||
|
@@ -99,7 +99,7 @@ describe("A rel parser", function() {
|
||||
});
|
||||
|
||||
describe("A punct parser", function() {
|
||||
const expression = ",;\\colon";
|
||||
const expression = ",;";
|
||||
|
||||
it("should not fail", function() {
|
||||
expect(expression).toParse(strictSettings);
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
@@ -289,6 +289,7 @@ Spacing: |
|
||||
^3+[-1][1-1]1=1(=1)\lvert a\rvert~b \\
|
||||
\scriptstyle{^3+[-1][1-1]1=1(=1)\lvert a\rvert~b} \\
|
||||
\scriptscriptstyle{^3+[-1][1-1]1=1(=1)\lvert a\rvert~b} \\
|
||||
a : a \colon a \\
|
||||
\end{matrix}
|
||||
Sqrt: |
|
||||
\sqrt{\sqrt{\sqrt{x}}}_{\sqrt{\sqrt{x}}}^{\sqrt{\sqrt{\sqrt{x}}}
|
||||
|
Reference in New Issue
Block a user