0

I am using iopart class for my document. In an equation I wish to use ket. For this reason I use \usepackage{physics}. But when I type this package, I alarmed by Command \equation already defined. And proram does not compile!!!

How I write the symbol ket?

  • 4
    physics is not a package too many are excited about. For \ket you can load the braket package. – user121799 Jun 28 '19 at 15:49
  • 4
    iopart is not friend to many packages, including amsmath. – egreg Jun 28 '19 at 15:51
  • @egreg: in French, there is this article (and a workaround) about incompatibilities between iopart and asmmath (the guilty is iopart): science.thilucmic.fr/index.php?c=la&p=iopart-amsmath. The translation in English provided by for example Google seems good. – quark67 Jun 28 '19 at 16:38
1

As suggested byquark67 we can use amsmath workaround by Thierry Masson on this occasion.

Note whilst IOPscience suggest not using amsmath because of the equation clash they do not exclude you using amsmath with other classes such as standard article.

"...using the IOP class file may help to speed the publication of accepted articles. Note that there is an incompatibility between amsmath.sty and iopart.cls. If your article relies on commands in amsmath.sty that are not available in iopart.cls, you may wish to consider using a different class file..."

\documentclass[12pt]{iopart} % Avoid iopams

% From http://science.thilucmic.fr/index.php?c=la&p=iopart-amsmath&l=en
% Blocks out ! LaTeX Error: Command \equation* already defined when loading amsmath
\expandafter\let\csname equation*\endcsname=\relax 
\expandafter\let\csname endequation*\endcsname=\relax 
\usepackage{amsmath,amssymb,amsthm} % note amssymb will load amsfonts per Barbara Beeton also to avoid physics use
\usepackage{braket} % as suggested by marmot and this example answer https://tex.stackexchange.com/questions/316836/the-bra-ket-notation-in-latex
    \begin{document}

    \begin{equation}
    \ket {\psi(t)}
    \end{equation}

\end{document}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.