# Beamer and tikz-cd

The answers here have helped me get the PDF to asctually compile, but the product is not what I need just yet Beamer Tikz-cd Problem

I am trying to produce this diagram, which compiles just fine in my thesis, just not in beamer

which in the thesis has the code

$\begin{tikzcd}[sep=huge] \large{\text{Poincaré}} \arrow[r,"\text{C}"] \arrow[rd, red, "\text{E} \hspace{1 em}\circ\hspace{1 em} \text{C}"'] & \large{\text{Galilei}} \arrow[d,"\text{E}"] \\ & \large{\text{Bargmann}} \end{tikzcd}$


In the beamer, I followed some suggestions from the above Stack answer but so far I only have

with the following code

$\begin{tikzcd}[ampersand replacement=\&,sep=huge] \large{\text{Poincaré}} \arrow[r,"\text{C}"] \arrow[rd, red, "\text{E} \hspace{1 em}\circ\hspace{1 em} \text{C}"'] \& \large{\text{Galilei}} \arrow[d,"\text{E}"] \\ \& \large{\text{Bargmann}} \end{tikzcd}$


and the following errors

• \documentclass{beamer} \usepackage{amsmath} \usepackage{tikz-cd} \begin{document} \begin{frame}[t] \frametitle{\dots} $\begin{tikzcd}[ampersand replacement=\&,sep=huge] \text{\large{Poincar\'e}} \arrow[r,"\text{C}"] \arrow[rd, red, "\text{E} \hspace{1 em}\circ\hspace{1 em} \text{C}"'] \& \text{\large{Galilei}} \arrow[d,"\text{E}"] \\ \& \text{\large{Bargmann}} \end{tikzcd}$ \end{frame} \end{document} compiles without error. Can you please provide a minimal document that shows the problems?
– user194703
Jun 8, 2020 at 20:07
• From the error message I suppose that you need \usetikzlibrary{babel} in the preamble. That is, you probably load the babel package, and since tikz-cd is loading and using the quotes library, you also need the babel TikZ library.
– user194703
Jun 8, 2020 at 20:09
• @Schrödinger'scat I have put \usepackage[utf8]{inputenc} instead of \usetikzlibrary{babel}. Jun 8, 2020 at 20:10
• @Sebastiano Well, do you reproduce the OP's error messages if you remove \usepackage[utf8]{inputenc}? Probably not. So presumably this does not fix the problem. (Please do not get me wrong, I am also guessing, but since the OP uses \usepackage[czech]{babel} in other codes, and since adding \usepackage[czech]{babel} allows me to reproduce the error messages, I feel that there is a chance that my guess is correct.)
– user194703
Jun 8, 2020 at 20:18
• @Sebastiano I did not mean to suggest that you delete your answer, I was only suggesting changes so that others feel more comfortable upvoting it.
– user194703
Jun 8, 2020 at 20:21

With the suggestion of the very nice user Schrödinger's cat.....

\documentclass[a4paper,12pt]{beamer}
\usepackage[czech]{babel}
\usepackage{tikz-cd}
\usetikzlibrary{babel}

\begin{document}
\begin{tikzcd}[ampersand replacement=\&,sep=huge]
\text{\large Poincaré}\arrow[r,"\text{C}"] \arrow[rd, red, "\text{E} \hspace{1 em}\circ\hspace{1 em} \text{C}"'] \& \large{\text{Galilei}} \arrow[d,"\text{E}"] \\
\& \large{\text{Bargmann}}
\end{tikzcd}
\end{document}