Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
base | MathJax: Full | KaTeX: Full | XeTeX: Full |
textmacros | MathJax: Full | KaTeX: Full | XeTeX: Full |
Syntax#
\textupm:T{a}text contentArgspec m:T — one mandatory argument. Same argspec in base and textmacros. Reading argspecs
Examples#
Package variants#
| Package | Signature | Allowed mode | Notes |
|---|---|---|---|
base | m:T | math | Explicitly setting inserted text upright inside math expressions. |
textmacros | m:T | text | Used to force upright text for a short span inside MathJax text mode. |
In TeXForm#
TeXForm parses this entry as prefix syntax; the package determines its argument specification.
Expands to (textmacros)#
\textup{#1} {\rm #1}MathJax textmacros implements this identically to \textrm and \textnormal, rather than distinguishing upright-shape semantics as full LaTeX does.
Equivalent forms#
\textrm{#1}exactMathJax maps both to BaseMethods.HBox with VARIANT.NORMAL; LaTeX NFSS distinguishes family and shape conceptually, but not here.
\textrm{#1}exactIn MathJax textmacros, both commands map to {
\rm#1}.\textnormal{#1}exactIn MathJax textmacros, both commands map to {
\rm#1}.
See also#
\bmodbase\bmqtyphysics\boxedams\brabraket\Brabraket\flatfracphysics\hboxbase\iffbase\imathbbbboldx\imathbfbbbboldx\impliedbyams\impliesams\itextbbbboldx\itextbfbbbboldx\jmathbbbboldx\jmathbfbbbboldx\jtextbbbboldx\jtextbfbbbboldx\ketbraket\Ketbraket\ketbrabraket\Ketbrabraket\LaTeXbase\mathstrutbase\matrixdeterminantphysics\mboxbase\mdetphysics\modbase\pmbbase\pmodbase\pmqtyphysics\Pmqtyphysics\podbase\qcphysics\qcommaphysics\Residuephysics\sbmqtyphysics\skewbase\smdetphysics\spmqtyphysics\sPmqtyphysics\stackbinbase\stackrelbase\substackams\svmqtyphysics\TeXbase\textbase\textbfbase\textitbase\textnormalbase\textrmbase\textsfbase\textttbase\varinjlimams\varliminfams\varlimsupams\varprojlimams\vmqtyphysics\zeromatrixphysics\zmatphysics
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\textup{a} | Positive · baseline | Pass | Pass | Pass |
\textup a | Positive · bare[0] | Pass | Pass | Pass |
\textup{a^2} | Negative · neg:T[0] | Pass | Fail | Fail |
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\textup{a} | Positive · baseline | Pass | Pass | Pass |
\textup a | Positive · bare[0] | Pass | Pass | Pass |
\textup{a^2} | Negative · neg:T[0] | Fail | Fail | Fail |