Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
base | MathJax: Full | KaTeX: Full | XeTeX: None |
textmacros | MathJax: None | KaTeX: Full | XeTeX: None |
Syntax#
\textm:T{a}text contentArgspec m:T — one mandatory argument. Same argspec in base and textmacros. Reading argspecs
Common tasks#
How to insert a word in a formula#
How to write a cases condition#
Examples#
Package variants#
| Package | Signature | Allowed mode | Notes |
|---|---|---|---|
base | m:T | math | Inserting words or short phrases into mathematical expressions. |
textmacros | m:T | text | — |
In TeXForm#
TeXForm parses this entry as prefix syntax; the package determines its argument specification.
Equivalent forms#
\textnormal{#1}exactIn MathJax base, both map directly to BaseMethods.HBox with no extra style or font arguments.
See also#
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\text{a} | Positive · baseline | Pass | Pass | Fail |
\text a | Positive · bare[0] | Pass | Pass | Fail |
\text{a^2} | Negative · neg:T[0] | Pass | Fail | Fail |
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\text{a} | Positive · baseline | Fail | Pass | Fail |
\text a | Positive · bare[0] | Fail | Pass | Fail |
\text{a^2} | Negative · neg:T[0] | Fail | Fail | Fail |