Skip to content

physics package in Scissor LaTeX

The physics package does not work in Scissor LaTeX: commands from physics such as \abs, \norm, \dv, \pdv, \qty, \vb and \grad are unknown, so every formula that uses one is shown in red; define the few you need with \newcommand, or write them out.

What the package does

physics offers short commands for notation that physicists write often: absolute values and norms (\abs, \norm), derivatives (\dv, \pdv), automatic brackets (\qty), bold vectors (\vb), vector operators (\grad, \curl), traces and matrices (\tr, \mqty), and bra-ket notation.

What works here

CommandIn Scissor LaTeXWrite instead
\abs{x}Not supported\left\lvert x \right\rvert
\norm{v}Not supported\left\lVert v \right\rVert
\dv{f}{x}Not supported\frac{\mathrm{d} f}{\mathrm{d} x}
\pdv{f}{x}Not supported\frac{\partial f}{\partial x}
\qty(...)Not supported\left( ... \right)
\vb{F}, \vu{x}Not supported\mathbf{F}, \hat{\mathbf{x}}
\grad, \curl, \laplacianNot supported\nabla f, \nabla \times \mathbf{F}, \nabla^2 f
\divDifferentHere (as in plain LaTeX) \div is the division sign ÷. Write \nabla \cdot \mathbf{F}.
\tr, \TrNot supported\operatorname{Tr} A
\dd xNot supported\,\mathrm{d}x
\eval{f}_0^1Not supported\left. f \right\rvert_0^1
\order{x^2}Not supported\mathcal{O}(x^2)
\mqty(...)Not supported\begin{pmatrix} ... \end{pmatrix}
\ev, \expval, \commNot supported\langle x \rangle, and [A, B] for a commutator

Examples

A formula with \abs and \dv is shown in red:

physics commands show a red formula

LaTeXPreamble: \usepackage{physics}Open in editor (opens in a new tab)
\abs{x - 44} + \dv{f}{x}

Shown in red: the formula cannot be read, so its source is shown instead.

The same notation written with standard commands:

Written out with standard commands

LaTeXPreamble: \usepackage{amsmath}Open in editor (opens in a new tab)
\left\lvert x - 44 \right\rvert + \frac{\mathrm{d} f}{\mathrm{d} x},
\qquad
\left\lVert \mathbf{v} \right\rVert,
\qquad
\nabla \times \mathbf{F},
\qquad
\int_0^1 f(x) \,\mathrm{d}x

For partial derivatives and expectation values, write them with the standard commands:

\pdv and \expval written with standard commands

\frac{\partial f}{\partial x} + \frac{\partial^2 f}{\partial x \, \partial y},
\qquad
\langle x \rangle = 44

If you use these often, define your own short commands in the preamble. Do not load physics at the same time, because in a TeX installation it already defines these names:

Your own \abs, \norm, \dv and \dd

\documentclass{article}
\usepackage{amsmath}
\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\norm}[1]{\left\lVert #1 \right\rVert}
\newcommand{\dv}[2]{\frac{\mathrm{d} #1}{\mathrm{d} #2}}
\newcommand{\dd}{\,\mathrm{d}}
\newcommand{\vb}[1]{\mathbf{#1}}
\DeclareMathOperator{\Tr}{Tr}
\begin{document}
\[
  \abs{x - 44} \le \norm{\vb{v}}, \qquad
  \dv{f}{x}, \qquad
  \int_0^1 f(x) \dd x, \qquad
  \Tr A
\]
\end{document}

Compatibility

  • From a TeX installation to here: every formula with a physics command turns red. Add the \newcommand lines above (and remove \usepackage{physics}) to make them work in both places.
  • From here to a TeX installation: documents with your own commands compile there unchanged.

The full manual is on CTAN: ctan.org/pkg/physics. See also Your own commands with \newcommand and Brackets and delimiters.

Questions and answers

How do I write an absolute value without the physics package?

Write \left\lvert x \right\rvert, or define \newcommand{\abs}[1]{\left\lvert #1 \right\rvert} once in the preamble and keep writing \abs{x}.

Why is a formula with physics commands red?

The converter does not know the physics commands, so a formula that uses one is shown in red and named in the Problems tab. Write the standard commands from the table above, or define your own with \newcommand.

Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-06.