1

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

enter image description here

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

enter image description here 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

enter image description here

  • 3
    \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 at 20:07
  • 1
    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 at 20:09
  • @Schrödinger'scat I have put \usepackage[utf8]{inputenc} instead of \usetikzlibrary{babel}. – Sebastiano Jun 8 at 20:10
  • 2
    @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 at 20:18
  • 1
    @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 at 20:21
2

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}

[1]: https://i.stack.imgur.com/PFLFV.png

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.