Renderer support
| Package | MathJax | KaTeX | XeTeX |
|---|---|---|---|
physics | MathJax: Full | KaTeX: None | XeTeX: Full |
Syntax#
\ips*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#
\ip{a} \left\langle{a}\middle\vert{a}\right\rangleShort alias for \braket with identical behavior
Equivalent forms#
\innerproduct{#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#
\braketbraket\innerproductphysics
Test cases#
| Input | Case | MathJax | KaTeX | XeTeX |
|---|---|---|---|---|
\ip{a} | Positive · baseline | Pass | Fail | Pass |
\ip*{a} | Positive · vary:s[0] | Pass | Fail | Pass |
\ip{a}{b} | Positive · vary:g[2] | Pass | Fail | Pass |
\ip*{a}{b} | Positive · maximal | Pass | Fail | Pass |
\ip a | Positive · bare[1] | Pass | Fail | Pass |