physics

The physics extension implements much of the LaTeX physics package, which defines simple, yet flexible macros for typesetting equations via:

  • Automatic bracing

  • Vector notation

  • Derivatives

  • Dirac bra-ket notation

  • Matrix macros

  • Additional trig functions and other convenient operators

  • Flat fractions and other useful miscellaneous math macros

See the documentation for the LaTeX package for more information.

This package is not autoloaded, due to the fact that it redefines many standard macros, so you must request it explicitly if you want to use it. To load the physics extension, add '[tex]/physics' to the load array of the loader block of your MathJax configuration, and add 'physics' to the packages array of the tex block.

window.MathJax = {
  loader: {load: ['[tex]/physics']},
  tex: {packages: {'[+]': ['physics']}}
};

Alternatively, use \require{physics} in a TeX expression to load it dynamically from within the math on the page, if the require package is loaded.


physics Options

Adding the physics extension to the packages array defines an physics sub-block of the tex configuration block with the following values:

MathJax = {
  tex: {
    physics: {
      italicdiff: false,
      arrowdel: false
    }
  }
};
italicdiff: false

This corresponds to the italicdiff option of the physics LaTeX package to use italic form for the d in the \differential and \derivative` commands.

arrowdel: false

This corresponds to the arrowdel option of the physics LaTeX package to use vector notation over the nabla symbol.

Note, that the physics extension does not implement the notrig option.


physics Commands

The physics extension implements the following macros: \abs, \absolutevalue, \acomm, \acos, \acosecant, \acosine, \acot, \acotangent, \acsc, \admat, \anticommutator, \antidiagonalmatrix, \arccos, \arccosecant, \arccosine, \arccot, \arccotangent, \arccsc, \arcsec, \arcsecant, \arcsin, \arcsine, \arctan, \arctangent, \asec, \asecant, \asin, \asine, \atan, \atangent, \bmqty, \bqty, \Bqty, \bra, \braket, \comm, \commutator, \cos, \cosecant, \cosh, \cosine, \cot, \cotangent, \coth, \cp, \cross, \crossproduct, \csc, \csch, \curl, \dd, \derivative, \det, \determinant, \diagonalmatrix, \diffd, \differential, \div, \divergence, \dmat, \dotproduct, \dv, \dyad, \erf, \ev, \eval, \evaluated, \exp, \expectationvalue, \exponential, \expval, \fderivative, \fdv, \flatfrac, \functionalderivative, \grad, \gradient, \gradientnabla, \hypcosecant, \hypcosine, \hypcotangent, \hypsecant, \hypsine, \hyptangent, \identitymatrix, \Im, \imaginary, \imat, \innerproduct, \ip, \ket, \ketbra, \laplacian, \ln, \log, \logarithm, \matrixdeterminant, \matrixel, \matrixelement, \matrixquantity, \mdet, \mel, \mqty, \naturallogarithm, \norm, \op, \order, \outerproduct, \partialderivative, \paulimatrix, \pb, \pderivative, \pdv, \pmat, \pmqty, \Pmqty, \poissonbracket, \pqty, \Pr, \principalvalue, \Probability, \pv, \PV, \qall, \qand, \qas, \qassume, \qc, \qcc, \qcomma, \qelse, \qeven, \qfor, \qgiven, \qif, \qin, \qinteger, \qlet, \qodd, \qor, \qotherwise, \qq, \qqtext, \qsince, \qthen, \qty, \quantity, \qunless, \qusing, \rank, \Re, \real, \Res, \Residue, \sbmqty, \sec, \secant, \sech, \sin, \sine, \sinh, \smallmatrixquantity, \smdet, \smqty, \spmqty, \sPmqty, \svmqty, \tan, \tangent, \tanh, \tr, \Tr, \trace, \Trace, \va, \var, \variation, \vb, \vdot, \vectorarrow, \vectorbold, \vectorunit, \vmqty, \vnabla, \vqty, \vu, \xmat, \xmatrix, \zeromatrix, \zmat

And the following environments: smallmatrix