Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
physics | MathJax: Full | KaTeX: None | XeTeX: Full |
Syntax#
\innerproducts*starm{a}math contentg{b}optional math contentArgspec s m g — two 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#
\innerproduct{#1}{#2} \left\langle{#1}\middle\vert{#2}\right\rangleWhen unstarred. If #2 is omitted, expands to \left\langle{#1}\middle\vert{#1}\right\rangle. Starred forms use unscaled \langle and \rangle.
Equivalent forms#
\ip{#1}{#2}exactAlias implemented by the same parse method; the same optional star and optional second braced group are also accepted.
\braket{#1}{#2}exactAlias implemented by the same parse method; if the second braced group is omitted, MathJax duplicates #1 as the ket.
See also#
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\innerproduct{a} | Positive · baseline | Pass | Fail | Pass |
\innerproduct*{a} | Positive · vary:s[0] | Pass | Fail | Pass |
\innerproduct{a}{b} | Positive · vary:g[2] | Pass | Fail | Pass |
\innerproduct*{a}{b} | Positive · maximal | Pass | Fail | Pass |
\innerproduct a | Positive · bare[1] | Pass | Fail | Pass |