0

Is there a standard way to make a tikz-cd figure consisting of two commutative diagrams appearing side by side with a \Rightarrow in between them? I would like to write a conditional statement with diagrams.

  • 7
    Welcome! Is this a typography question? Just place them both besides each other and place a \Rightarrow between them (in math mode, of course). Should both CDs have the same rows? Do they need braces around them? – Qrrbrbirlbel Mar 11 '23 at 17:53
  • As an example see https://tex.stackexchange.com/questions/664078/ – Zarko Mar 11 '23 at 20:25
  • @Qrrbrbirlbel thanks for the suggestion, I didn't know figures were stacked horizontally, this is good to know. Then I just changed the baseline parameter suggested by egreg and it worked well! – Carson James Mar 13 '23 at 06:00

1 Answers1

2

Just place the diagrams side by side, the only problem is the vertical alignment.

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}

\begin{document}

\begin{equation} \begin{tikzcd}[baseline=-axis_height] A \arrow[r] \arrow[d] & B \arrow[d] \ C \arrow[r] \arrow[d] & D \arrow[dl] \ E \end{tikzcd} \implies \begin{tikzcd}[baseline=-axis_height] X \arrow[r] \arrow[dr] & Y \arrow[d] \ & Z \end{tikzcd} \end{equation}

\end{document}

enter image description here

egreg
  • 1,121,712