It seems that I cannot modify \mathrel
without breaking \overset
, and I do not understand why. The following fails to compile even when the redefinition of \mathrel
does exactly the same as the original version.
\documentclass{article}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\begin{document}
\let\oldmathrel\mathrel
\def\mathrel#1{\oldmathrel{#1}}
$A \overset{X}{\to} B$
\end{document}
The error message is:
Runaway argument?
\relax\@nil \binrel@@ {\mathop {\kern \z@ \to }\limits ^{X}} B$ \end \ETC.
! File ended while scanning use of \@tempb.
<inserted text>
\par
What is going on?
\mathrel
in the first place.\mathrel
do wrong? Just because you can change something does not mean you should\DeclareMathSymbol
you don't need to redefine tex primitives to change their definition.\mathrel
will have no effect on\leq
,\sim
, and any of the basic relation symbol commands (except\cong
,\notin
and perhaps a few others)