I'm using \documentclass[11pt]{beamer}
with the package Tikzcd but it doesn't work properly with the frames. It gives me the error:
Package pgf Error: Single ampersand used with wrong catcode. \end{frame}
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI'm using \documentclass[11pt]{beamer}
with the package Tikzcd but it doesn't work properly with the frames. It gives me the error:
Package pgf Error: Single ampersand used with wrong catcode. \end{frame}
As noted in section 3.4 of the tikz-cd
manual, you can use the ampersand replacement
key to solve this:
\documentclass[]{beamer}
\usepackage{tikz-cd}
\begin{document}
\begin{frame}{}{}
\begin{tikzcd}[ampersand replacement=\&]
A \ar[r]\& B
\end{tikzcd}
\end{frame}
\end{document}