Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
base | MathJax: Full | KaTeX: Full | XeTeX: Full |
textmacros | MathJax: Full | KaTeX: Full | XeTeX: Full |
Syntax#
\hphantomm{a}math contentArgspec m — one mandatory argument. In base. Reading argspecs
\hphantomm:T{a}text contentArgspec m:T — one mandatory argument. In textmacros. Reading argspecs
Examples#
Package variants#
| Package | Signature | Allowed mode | Notes |
|---|---|---|---|
base | m | math | Used to reserve horizontal space in a mathematical formula corresponding to the argument, while taking up zero vertical space. |
textmacros | m:T | text | Used to horizontally offset equations or table cells by a specific piece of text's width without altering vertical flow. |
In TeXForm#
TeXForm parses this entry as prefix syntax; the package determines its argument specification.
See also#
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\hphantom{a} | Positive · baseline | Pass | Pass | Pass |
\hphantom a | Positive · bare[0] | Pass | Pass | Pass |
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\hphantom{a} | Positive · baseline | Pass | Pass | Pass |
\hphantom a | Positive · bare[0] | Pass | Pass | Pass |
\hphantom{a^2} | Negative · neg:T[0] | Fail | Fail | Fail |