Code
Consider the following example:
\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\tegn}[1]{\mathcolor{red}{#1}}
\begin{document}
\begin{align}
1
&= 1 \\
1 \tegn{\cdot} 1 \tegn{:} \tegn{(} 1 \tegn{+} 1 \tegn{)}
&= \frac{1}{2}
\end{align}
\end{document}
Error
When I try to compile, I get the following error:
! Argument of \token_if_expandable:NTF has an extra }.
<inserted text>
\par
l.15 \end{align}
Question
The code in the (almost) MEW doesn't compile but when I remove the only the last &
, everything is fine. (The first &
doesn't cause any problems at all.)
How can I make the code compilable when aligning the equations?
\relax
before the&
:-)
Should I delete the question?