From 88d9a8a4df296a5d4f7acaf5454bdadb365e48d3 Mon Sep 17 00:00:00 2001 From: elbaro Date: Sun, 2 Jun 2019 09:20:26 +0900 Subject: [PATCH] Add \plim (#1952) * Add \plim * tweak position of argmin and plim in support table --- docs/support_table.md | 1 + docs/supported.md | 4 ++-- src/macros.js | 1 + test/katex-spec.js | 4 ++++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/support_table.md b/docs/support_table.md index 75b0fc24..b621d7e2 100644 --- a/docs/support_table.md +++ b/docs/support_table.md @@ -799,6 +799,7 @@ table td { |\pi|$\pi$|| |{picture}|Not supported|| |\pitchfork|$\pitchfork$|| +|\plim|$\plim$|| |\plusmn|$\plusmn$|| |\pm|$\pm$|| |\pmatrix|Not supported|See `{pmatrix}`| diff --git a/docs/supported.md b/docs/supported.md index f9bdcdec..2662618f 100644 --- a/docs/supported.md +++ b/docs/supported.md @@ -110,7 +110,7 @@ The `{array}` environment does not yet support `\cline` or `\multicolumn`. **Greek Letters** -Direct Input: $Α Β Γ Δ Ε Ζ Η Θ Ι \allowbreak Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω$ +Direct Input: $Α Β Γ Δ Ε Ζ Η Θ Ι \allowbreak Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω$ $\allowbreak α β γ δ ϵ ζ η θ ι κ λ μ ν ξ o π \allowbreak ρ σ τ υ ϕ χ ψ ω ε ϑ ϖ ϱ ς φ$ ||||| @@ -358,7 +358,7 @@ Direct Input: $+ - / * ⋅ ± × ÷ ∓ ∔ ∧ ∨ ∩ ∪ ≀ ⊎ ⊓ ⊔ ⊕ | $\cosec$ `\cosec` | $\hom$ `\hom` | $\tg$ `\tg` | $\Pr$ `\Pr` | | $\cosh$ `\cosh`| $\ker$ `\ker` | $\th$ `\th` | $\sup$ `\sup` | | $\cot$ `\cot` | $\lg$ `\lg`| $\operatorname{f}$ `\operatorname{f}` | $\argmax$ `\argmax` | -|$\argmin$ `\argmin`| +| $\argmin$ `\argmin`| $\plim$ `\plim` | Functions on the right column of this table can take `\limits`. diff --git a/src/macros.js b/src/macros.js index c6d6f5d6..76fcd968 100644 --- a/src/macros.js +++ b/src/macros.js @@ -944,6 +944,7 @@ defineMacro("\\Zeta", "\\mathrm{Z}"); defineMacro("\\argmin", "\\DOTSB\\mathop{\\operatorname{arg\\,min}}\\limits"); defineMacro("\\argmax", "\\DOTSB\\mathop{\\operatorname{arg\\,max}}\\limits"); +defineMacro("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits"); // Custom Khan Academy colors, should be moved to an optional package defineMacro("\\blue", "\\textcolor{##6495ed}{#1}"); diff --git a/test/katex-spec.js b/test/katex-spec.js index a64d85d1..9cdf8ae5 100644 --- a/test/katex-spec.js +++ b/test/katex-spec.js @@ -3198,6 +3198,10 @@ describe("A macro expander", function() { expect`\liminf`.toParseLike`\mathop{\operatorname{lim\,inf}}\limits`; }); + it("should expand \\plim as expected", () => { + expect`\plim`.toParseLike`\mathop{\operatorname{plim}}\limits`; + }); + it("should expand \\argmin as expected", () => { expect`\argmin`.toParseLike`\mathop{\operatorname{arg\,min}}\limits`; });