2

I'm having a problem that I have no idea what it can be caused by, the error it produces is the following "TeX capacity exceeded, sorry [semantic nest size=500]. \end{align}" Using TeX studio and have compiled with both PDFLatex and LuaLaTeX getting the same result.

Here's a MWE that produces the error (have included the whole preamble since adding '\usepackage{unicode-math}' to the preamble somehow solves the problem (but I don't want to use unicode math):

\documentclass[]{article}

\usepackage[usenames, dvipsnames]{color}
\usepackage{amsmath,amssymb}
\usepackage{mathtools}  
\usepackage[mathscr]{euscript}
\usepackage{physics}
\usepackage{esvect}
\usepackage{tensor}
\usepackage[makeroom]{cancel}
\usepackage{bigints}
\usepackage{bbold}
\let\dagger\dag

\begin{document}
        \begin{align}
    \ket{q,t}&=\mathcal{U}^\dag\ket{q}\\
    \ket{p,t}&=\mathcal{U}^\dag\ket{p}
    \end{align}
\end{subequations}
\end{document}

What could possibly be causing the error and how to fix it? Why does unicode math solve it?

1
  • Shouldn't it be \let\dag\dagger?
    – user121799
    Oct 24, 2018 at 2:42

1 Answer 1

1

The assignment works the other way around, you need to say \let\dag\dagger to have a shorthand for \dagger. I'd never do that in my documents. Imagine you share your documents with collaborators, and they'd do the same. (I also kicked out the unrelated packages.)

\documentclass[]{article}
\usepackage{amsmath,amssymb}
\usepackage{physics}

\let\dag\dagger

\begin{document}
\begin{subequations}
\begin{align}
    \ket{q,t}&=\mathcal{U}^\dag\ket{q}\\
    \ket{p,t}&=\mathcal{U}^\dag\ket{p}
\end{align}
\end{subequations}
\end{document}

enter image description here

1
  • That fixed the problem completely! Thank you! However I still wonder why including unicode math made it so it didn't mind.
    – DDamian
    Oct 24, 2018 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .