I found that I could not use square brackets as label of arrow when using tikz-cd package to draw commutative diagram. A MWE:
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
Z \arrow[r,"[1]"]& X
\end{tikzcd}
\end{document}
I got the following error:
Argument of \tikz@quote@@parser has an extra }. ^^I\end{tikzcd}
If I use instead \arrow[r]{[1]}, I get no error but the brackets are not showed in the pdf.
I looked through the documentation of tikz-cd and failed to find the reason.
Thanks for you help.
\arrow[r,"{[1]}"]in order to “hide” the inner bracket? – egreg Jan 05 '21 at 08:47