Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
physics | MathJax: Full | KaTeX: None | XeTeX: Full |
Syntax#
\vus*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#
\vu{#1} \hat{\vb{#1}}If the optional star is present, the template parts are joined with '*', so \vu*{#1} reparses as \hat{\vb*{#1}}.
Canonicalize vu to an explicit hat-wrapped mathbf form.
\vu{#1} \hat{\mathbf{#1}}Equivalent forms#
\vectorunit{#1}exact\vectorunit*{#1}exactStarred long-form equivalent.
\hat{\vb{#1}}exact\hat{\vb*{#1}}exactStarred form.
See also#
\vaphysics\vectorarrowphysics\vectorunitphysics
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\vu{a} | Positive · baseline | Pass | Fail | Pass |
\vu*{a} | Positive · vary:s[0] | Pass | Fail | Pass |
\vu a | Positive · bare[1] | Pass | Fail | Pass |