Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
physics | MathJax: Full | KaTeX: None | XeTeX: Full |
Syntax#
\vectorunits*starm{a}math contentArgspec s m — one optional and one mandatory argument. Reading argspecs
Examples#
In TeXForm#
TeXForm parses this entry as prefix syntax; the package determines its argument specification.
Expands to#
\vectorunit{#1} \hat{\vb{#1}}If the optional star is present, the template parts are joined with '*', so \vectorunit*{#1} reparses as \hat{\vb*{#1}}.
Collapse vectorunit to the short vu helper.
\vectorunit{#1} \vu{#1}Equivalent forms#
\hat{\vb{#1}}exact\hat{\vb*{#1}}exactStarred form.
\vu{#1}exact\vu*{#1}exactStarred alias form.
See also#
\vaphysics\vectorarrowphysics\vuphysics
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\vectorunit{a} | Positive · baseline | Pass | Fail | Pass |
\vectorunit*{a} | Positive · vary:s[0] | Pass | Fail | Pass |
\vectorunit a | Positive · bare[1] | Pass | Fail | Pass |