Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
base | MathJax: Partial | KaTeX: Partial | XeTeX: Partial |
textmacros | MathJax: Partial | KaTeX: Partial | XeTeX: Partial |
Syntax#
\hspaces*starm:L{1em}dimensionArgspec s m:L — one optional and one mandatory argument. Same argspec in base and textmacros. Reading argspecs
Examples#
Package variants#
| Package | Signature | Allowed mode | Notes |
|---|---|---|---|
base | s m:L | math | Manual horizontal spacing around symbols or subexpressions in math formulas. |
textmacros | s m:L | text | Used to insert explicit horizontal space in text documents and layouts. |
In TeXForm#
TeXForm parses this entry as prefix syntax; the package determines its argument specification.
Equivalent forms#
\hskip #1exactBoth names are mapped directly to the same MathJax parse method with no extra parameters.
\hskip #1approximatePlain TeX primitive.
See also#
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\hspace{1pt} | Positive · baseline | Pass | Pass | Pass |
\hspace*{1pt} | Positive · vary:s[0] | Fail | Pass | Pass |
\hspace 1pt | Positive · bare[1] | Pass | Fail | Fail |
\hspace{a} | Negative · neg:L[1] | Fail | Fail | Fail |
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\hspace{1pt} | Positive · baseline | Pass | Pass | Pass |
\hspace*{1pt} | Positive · vary:s[0] | Fail | Pass | Pass |
\hspace 1pt | Positive · bare[1] | Pass | Fail | Fail |
\hspace{a} | Negative · neg:L[1] | Fail | Fail | Fail |