# Horizontal alignement of two tikzcd

How can I put two copies of this tikzcd on the same line?

$\begin{tikzcd}[row sep=2.5em] & \text{A} \arrow[dash]{dr}{1} \\ \text{B} \arrow[dash]{ur}{2} \arrow[dash]{rr}{3} && \text{C} \end{tikzcd}$

• If you want upright letters, you should use \mathrm{A}, rather than \text{A}. – egreg Jun 25 '18 at 21:09

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
$\begin{tikzcd}[row sep=2.5em] & \text{A} \arrow[dash]{dr}{1} \\ \text{B} \arrow[dash]{ur}{2} \arrow[dash]{rr}{3} && \text{C} \end{tikzcd} \quad \begin{tikzcd}[row sep=2.5em] & \text{A} \arrow[dash]{dr}{1} \\ \text{B} \arrow[dash]{ur}{2} \arrow[dash]{rr}{3} && \text{C} \end{tikzcd}$
\end{document}


If you have different diagrams, you may want to make use of the baseline option,

\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
$\begin{tikzcd}[row sep=2.5em,baseline=(B.base)] & \text{A} \arrow[dash]{dr}{1} & \\ |[alias=B]|\text{B} \arrow[dash]{ur}{2} \arrow[dash]{rr}{3} && \text{C} \end{tikzcd} \quad \begin{tikzcd}[row sep=2.5em,baseline=(B.base)] & \text{A} \arrow[dash]{dr}{1} &\\ |[alias=B]|\text{B} \arrow[dash]{ur}{2} \arrow[dash]{dr}{4} \arrow[dash]{rr}{3} && \text{C} \\ & \text{D} & \end{tikzcd}$
\end{document}


or put the diagrams in \vcenter{\hbox{...}} to vertically center them.

• Sure! That's done. – Aleph Jun 26 '18 at 8:40