I have heard of a LaTeX-command which provides font-dependent code selection in math mode, but I forgot the name of it and cannot find it – Here is what I mean:

\unknownCommand{display size code}{text size code}{script size code}{scriptscript size code}

so that one could write

$\unknownCommand{...}$ % => outputs "display size code"
$e^{\unknownCommand{...}}$ % => outputs "script size code"

Do you know what command it is?


But beware \mathchoice is one of the most weird and hard to use parts of TeX, it always typesets all four branches and TeX makes a decision much later when converting the math list into a horizontal list as to which branch to use. (This is to support the unfortunate syntax of the \over primitive which means you don't know what style you are in at the point macros are expanded)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.