I am trying to create some diagrams using tikz-cd, but I get several errors the moment I add any label to the arrows. To be precise, this works fine:
\[
\begin{tikzcd}
G \arrow[r] \arrow[d] & G \cdot x \arrow[d] \\
G \arrow[r] & G \cdot x
\end{tikzcd}
\]
While this gives errors:
\[
\begin{tikzcd}
G \arrow[r, "a"] \arrow[d] & G \cdot x \arrow[d] \\
G \arrow[r] & G \cdot x
\end{tikzcd}
\]
The errors I get are the following
Incomplete \iffalse; all text was ignored after line 621. [\include{chapter1}]
Improper \prevdepth. [\include{chapter1}]
Missing \endcsname inserted. [\include{chapter1}]
You can't use `\relax' after \the. [\include{chapter1}]
Improper \prevdepth. [\clearemptydoublepage]
TeX capacity exceeded, sorry [input stack size=5000]. [\clearemptydoublepage]
I am using the babel package with the spanish language, which has given me problems with tikzcd before, but that does not seem to be the problem.
\documentclass{article} \usepackage{tikz-cd} \usepackage[spanish]{babel} \usetikzlibrary{babel} \begin{document} \[ \begin{tikzcd} G \arrow[r, "a"] \arrow[d] & G \cdot x \arrow[d] \\ G \arrow[r] & G \cdot x \end{tikzcd} \] \end{document}I get the same error message as you. Commenting out the\usepackage[spanish]{babel}line results in no error messages. – leandriis Aug 08 '20 at 09:29\usetikzlibrary{babel}as in\documentclass{article} \usepackage{tikz-cd} \usepackage[spanish]{babel} \usetikzlibrary{babel} \begin{document} \[ \begin{tikzcd} G \arrow[r, "a"] \arrow[d] & G \cdot x \arrow[d] \\ G \arrow[r] & G \cdot x \end{tikzcd} \] \end{document}. – leandriis Aug 08 '20 at 09:29.auxfile to eliminate the error. Using thebabelTikZ library works most of the times, but in this age of UTF8 my options is usingshorthands=offin the babel invocation and be happy... more or less. – Rmano Aug 08 '20 at 10:40\usepackage[english, spanish, es-noshorthands, shorthands=off]{babel}(@leandriis if you are interested... ;-) ) – Rmano Aug 08 '20 at 10:45