mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
Implements \mathchoice command (#969)
This PR implements `\mathchoice` function. I once created PR on the wrong branch. Sorry for the mess. This is particularly useful when one defines custom macro for "big operators". For example: ```latex \newcommand{\infdisj}{% \mathop{% \mathchoice{% display \bigvee\hspace{-2ex}\bigvee% }{ % inline \bigvee\hspace{-1.75ex}\bigvee% }{ % script \bigvee\hspace{-1.4ex}\bigvee% }{ % scriptscript \bigvee\hspace{-1ex}\bigvee% }}} ```
This commit is contained in:
committed by
Erik Demaine
parent
2d32263998
commit
6f1661f7da
@@ -144,6 +144,8 @@ LowerAccent: |
|
||||
\end{matrix}
|
||||
MathAtom: a\mathrel{\mathop{=}\limits^{\blue ?}}b
|
||||
MathAtom2: \mathop{\overline{\mathrm{lim}}}\limits_{x\to\infty}f(x)
|
||||
MathChoice: |
|
||||
{\displaystyle\mathchoice{D}{T}{S}{SS}} {\textstyle\mathchoice{D}{T}{S}{SS}} {\scriptstyle \mathchoice{D}{T}{S}{SS}} {\scriptscriptstyle\mathchoice{D}{T}{S}{SS}} \displaystyle X_{\mathchoice{D}{T}{S}{SS}_{\mathchoice{D}{T}{S}{SS}}}
|
||||
MathDefaultFonts: Ax2k\breve{a}\omega\Omega\imath+\KaTeX
|
||||
MathBb: \mathbb{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
||||
MathBf: \mathbf{Ax2k\breve{a}\omega\Omega\imath+\KaTeX}
|
||||
|
Reference in New Issue
Block a user