mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
feat: support AMS log-like symbols (#2429)
* Support AMS log-like symbols * Update documentation * Update \limits info in documentation
This commit is contained in:
@@ -500,7 +500,7 @@ use `\ce` instead|
|
||||
|\inf|$\inf$||
|
||||
|\infin|$\infin$||
|
||||
|\infty|$\infty$||
|
||||
|\injlim|<span style="color:firebrick;">Not supported</span>||
|
||||
|\injlim|$\injlim$|`\injlim`|
|
||||
|\int|$\int$||
|
||||
|\intercal|$\intercal$||
|
||||
|\intop|$\intop$||
|
||||
@@ -843,7 +843,7 @@ use `\ce` instead|
|
||||
|\precsim|$\precsim$||
|
||||
|\prime|$\prime$||
|
||||
|\prod|$\prod$||
|
||||
|\projlim|<span style="color:firebrick;">Not supported</span>||
|
||||
|\projlim|$\projlim$|`\projlim`|
|
||||
|\propto|$\propto$||
|
||||
|\providecommand|$\providecommand\greet{\text{Hello}} \greet$|`\providecommand\greet{\text{Hello}} \greet`|
|
||||
|\psi|$\psi$||
|
||||
@@ -1141,18 +1141,18 @@ use `\ce` instead|
|
||||
|\varDelta|$\varDelta$||
|
||||
|\varepsilon|$\varepsilon$||
|
||||
|\varGamma|$\varGamma$||
|
||||
|\varinjlim|<span style="color:firebrick;">Not supported</span>||
|
||||
|\varinjlim|$\varinjlim$|`\varinjlim`|
|
||||
|\varkappa|$\varkappa$||
|
||||
|\varLambda|$\varLambda$||
|
||||
|\varliminf|<span style="color:firebrick;">Not supported</span>||
|
||||
|\varlimsup|<span style="color:firebrick;">Not supported</span>||
|
||||
|\varliminf|$\varliminf$|`\varliminf`|
|
||||
|\varlimsup|$\varlimsup$|`\varlimsup`|
|
||||
|\varnothing|$\varnothing$||
|
||||
|\varOmega|$\varOmega$||
|
||||
|\varPhi|$\varPhi$||
|
||||
|\varphi|$\varphi$||
|
||||
|\varPi|$\varPi$||
|
||||
|\varpi|$\varpi$||
|
||||
|\varprojlim|<span style="color:firebrick;">Not supported</span>||
|
||||
|\varprojlim|$\varprojlim$|`\varprojlim`|
|
||||
|\varpropto|$\varpropto$||
|
||||
|\varPsi|$\varPsi$||
|
||||
|\varPsi|$\varPsi$||
|
||||
|
@@ -381,21 +381,24 @@ Direct Input: $+ - / * ⋅ ± × ÷ ∓ ∔ ∧ ∨ ∩ ∪ ≀ ⊎ ⊓ ⊔ ⊕
|
||||
### Math Operators
|
||||
|
||||
|||||
|
||||
|-----------|---------|-----------------|-----------|
|
||||
| $\arcsin$ `\arcsin` | $\cotg$ `\cotg` | $\ln$ `\ln` | $\det$ `\det` |
|
||||
| $\arccos$ `\arccos` | $\coth$ `\coth` | $\log$ `\log` | $\gcd$ `\gcd` |
|
||||
| $\arctan$ `\arctan` | $\csc$ `\csc` | $\sec$ `\sec` | $\inf$ `\inf` |
|
||||
| $\arctg$ `\arctg` | $\ctg$ `\ctg` | $\sin$ `\sin` | $\lim$ `\lim` |
|
||||
| $\arcctg$ `\arcctg` | $\cth$ `\cth` | $\sinh$ `\sinh`| $\liminf$ `\liminf` |
|
||||
| $\arg$ `\arg` | $\deg$ `\deg` | $\sh$ `\sh` | $\limsup$ `\limsup` |
|
||||
| $\ch$ `\ch` | $\dim$ `\dim` | $\tan$ `\tan` | $\max$ `\max` |
|
||||
| $\cos$ `\cos` | $\exp$ `\exp` | $\tanh$ `\tanh`| $\min$ `\min` |
|
||||
| $\cosec$ `\cosec` | $\hom$ `\hom` | $\tg$ `\tg` | $\Pr$ `\Pr` |
|
||||
| $\cosh$ `\cosh`| $\ker$ `\ker` | $\th$ `\th` | $\sup$ `\sup` |
|
||||
| $\cot$ `\cot` | $\lg$ `\lg`| $\argmax$ `\argmax` | $\argmin$ `\argmin` |
|
||||
| $\plim$ `\plim` | $\operatorname{f}$ `\operatorname{f}`| $\operatorname*{f}$ `\operatorname*{f}`| |
|
||||
|:--------------------|:--------------------|:----------------|:--------------|
|
||||
| $\arcsin$ `\arcsin` | $\cosec$ `\cosec` | $\deg$ `\deg` | $\sec$ `\sec` |
|
||||
| $\arccos$ `\arccos` | $\cosh$ `\cosh` | $\dim$ `\dim` | $\sin$ `\sin` |
|
||||
| $\arctan$ `\arctan` | $\cot$ `\cot` | $\exp$ `\exp` | $\sinh$ `\sinh` |
|
||||
| $\arctg$ `\arctg` | $\cotg$ `\cotg` | $\hom$ `\hom` | $\sh$ `\sh` |
|
||||
| $\arcctg$ `\arcctg` | $\coth$ `\coth` | $\ker$ `\ker` | $\tan$ `\tan` |
|
||||
| $\arg$ `\arg` | $\csc$ `\csc` | $\lg$ `\lg` | $\tanh$ `\tanh` |
|
||||
| $\ch$ `\ch` | $\ctg$ `\ctg` | $\ln$ `\ln` | $\tg$ `\tg` |
|
||||
| $\cos$ `\cos` | $\cth$ `\cth` | $\log$ `\log` | $\th$ `\th` |
|
||||
| $\operatorname{f}$ `\operatorname{f}` | |||
|
||||
| $\argmax$ `\argmax` | $\injlim$ `\injlim` | $\min$ `\min` | $\varinjlim$ `\varinjlim` |
|
||||
| $\argmin$ `\argmin` | $\lim$ `\lim` | $\plim$ `\plim` | $\varliminf$ `\varliminf` |
|
||||
| $\det$ `\det` | $\liminf$ `\liminf` | $\Pr$ `\Pr` | $\varlimsup$ `\varlimsup` |
|
||||
| $\gcd$ `\gcd` | $\limsup$ `\limsup` | $\projlim$ `\projlim` | $\varprojlim$ `\varprojlim` |
|
||||
| $\inf$ `\inf` | $\max$ `\max` | $\sup$ `\sup` |$\operatorname*{f}$ `\operatorname*{f}`|
|
||||
|
||||
Functions on the right column of this table can take `\limits`.
|
||||
|
||||
Functions in the bottom five rows of this table can take `\limits`.
|
||||
|
||||
### \sqrt
|
||||
|
||||
|
@@ -842,6 +842,15 @@ defineMacro("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");
|
||||
defineMacro("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}");
|
||||
defineMacro("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// From amsopn.sty
|
||||
defineMacro("\\injlim", "\\DOTSB\\operatorname*{int\\,lim}");
|
||||
defineMacro("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}");
|
||||
defineMacro("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}");
|
||||
defineMacro("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}");
|
||||
defineMacro("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}");
|
||||
defineMacro("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// MathML alternates for KaTeX glyphs in the Unicode private area
|
||||
defineMacro("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{\u2269}");
|
||||
|
@@ -3439,6 +3439,16 @@ describe("A macro expander", function() {
|
||||
expect`\liminf`.toParseLike`\operatorname*{lim\,inf}`;
|
||||
});
|
||||
|
||||
it("should expand AMS log-like symbols as expected", () => {
|
||||
expect`\injlim`.toParseLike`\operatorname*{int\,lim}`;
|
||||
expect`\projlim`.toParseLike`\operatorname*{proj\,lim}`;
|
||||
expect`\varlimsup`.toParseLike`\operatorname*{\overline{lim}}`;
|
||||
expect`\varliminf`.toParseLike`\operatorname*{\underline{lim}}`;
|
||||
expect`\varinjlim`.toParseLike`\operatorname*{\underrightarrow{lim}}`;
|
||||
expect`\varinjlim`.toParseLike`\operatorname*{\underrightarrow{lim}}`;
|
||||
expect`\varprojlim`.toParseLike`\operatorname*{\underleftarrow{lim}}`;
|
||||
});
|
||||
|
||||
it("should expand \\plim as expected", () => {
|
||||
expect`\plim`.toParseLike`\mathop{\operatorname{plim}}\limits`;
|
||||
});
|
||||
|
Reference in New Issue
Block a user