mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 11:18:39 +00:00
add \argmax and \argmin (#1820)
* add \argmax and \argmin * add reference to argmin and argmax
This commit is contained in:
committed by
Kevin Barabash
parent
e85cb97cca
commit
9ddc24c9f1
@@ -94,6 +94,8 @@ table td {
|
||||
|\arctan|$\arctan$||
|
||||
|\arctg|$\arctg$||
|
||||
|\arg|$\arg$||
|
||||
|\argmax|$\argmax$||
|
||||
|\argmin|$\argmin$||
|
||||
|{array}|$\begin{array}{cc}a&b\\c&d\end{array}$ | `\begin{array}{cc}`<br> `a & b \\`<br> `c & d`<br>`\end{array}`|
|
||||
|\array|<span style="color:firebrick;">Not supported</span>|see `{array}`|
|
||||
|\arraystretch|$\def\arraystretch{1.5}\begin{array}{cc}a&b\\c&d\end{array}$|`\def\arraystretch{1.5}`<br>`\begin{array}{cc}`<br> `a & b \\`<br> `c & d`<br>`\end{array}`|
|
||||
|
@@ -360,7 +360,8 @@ Direct Input: $+ - / * ⋅ ± × ÷ ∓ ∔ ∧ ∨ ∩ ∪ ≀ ⊎ ⊓ ⊔ ⊕
|
||||
| $\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`| $\operatorname{f}$ `\operatorname{f}` |
|
||||
| $\cot$ `\cot` | $\lg$ `\lg`| $\operatorname{f}$ `\operatorname{f}` | $\argmax$ `\argmax` |
|
||||
|$\argmin$ `\argmin`|
|
||||
|
||||
Functions on the right column of this table can take `\limits`.
|
||||
|
||||
|
@@ -876,3 +876,10 @@ defineMacro("\\thetasym", "\\vartheta");
|
||||
// TODO: defineMacro("\\varcoppa", "\\\mbox{\\coppa}");
|
||||
defineMacro("\\weierp", "\\wp");
|
||||
defineMacro("\\Zeta", "\\mathrm{Z}");
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// statmath.sty
|
||||
// https://ctan.math.illinois.edu/macros/latex/contrib/statmath/statmath.pdf
|
||||
|
||||
defineMacro("\\argmin", "\\DOTSB\\mathop{\\operatorname{arg\\,min}}\\limits");
|
||||
defineMacro("\\argmax", "\\DOTSB\\mathop{\\operatorname{arg\\,max}}\\limits");
|
||||
|
@@ -3140,6 +3140,14 @@ describe("A macro expander", function() {
|
||||
it("should expand \\liminf as expected", () => {
|
||||
expect`\liminf`.toParseLike`\mathop{\operatorname{lim\,inf}}\limits`;
|
||||
});
|
||||
|
||||
it("should expand \\argmin as expected", () => {
|
||||
expect`\argmin`.toParseLike`\mathop{\operatorname{arg\,min}}\limits`;
|
||||
});
|
||||
|
||||
it("should expand \\argmax as expected", () => {
|
||||
expect`\argmax`.toParseLike`\mathop{\operatorname{arg\,max}}\limits`;
|
||||
});
|
||||
});
|
||||
|
||||
describe("\\tag support", function() {
|
||||
|
Reference in New Issue
Block a user