add \argmax and \argmin (#1820)

* add \argmax and \argmin

* add reference to argmin and argmax
This commit is contained in:
René Filip
2019-01-13 00:36:36 +01:00
committed by Kevin Barabash
parent e85cb97cca
commit 9ddc24c9f1
4 changed files with 19 additions and 1 deletions

View File

@@ -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>&nbsp;&nbsp;&nbsp;`a & b \\`<br>&nbsp;&nbsp;&nbsp;`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>&nbsp;&nbsp;&nbsp;`a & b \\`<br>&nbsp;&nbsp;&nbsp;`c & d`<br>`\end{array}`|

View File

@@ -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`.

View File

@@ -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");

View File

@@ -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() {