This question already has an answer here:
- Conflict: onlyamsmath and TikZ 4 answers
This code lets pdflatex go into an infinite loop
\documentclass{scrbook}
% required for bug
\usepackage{onlyamsmath}
% required for tikzpicture
\usepackage{pgfplots}
\usetikzlibrary{calc}
% changes error
\usepackage{siunitx}
\begin{document}
\begin{tikzpicture}
\begin{axis}[name=plot1]
\end{axis}
\begin{axis}[name=plot2,at={($(plot1.east)+(0cm,0)$)},anchor=west]
\end{axis}
\end{tikzpicture}
\end{document}
after it reports this first error (actually the first error is something else but that is only because I reduced it to a minimal example)
! Undefined control sequence.
\next ->\@nil
Can somebody track the origin and or tell me a workaround?
]in the first emptyaxisenvironment. But it seems thatonlyamsmathis having an issue with$(plot1.east)+(0cm,0cm)$. And you also need\usetikzlibrary{calc}to do coordinate calculations. – Peter Grill Feb 22 at 23:28egend style={at={($(plot1.east)+(0cm,0)$)}}or something similar to your axis option. – hpesoj626 Feb 22 at 23:29legend style. – hpesoj626 Feb 23 at 0:08], but that was not the actual error.\usetikzlibrary{calc}is not needed for this error. One could add it, but that does not solve the problem. – Matthias Pospiech Feb 23 at 8:05