tikz-cd – Creating Symmetric Triangles in TikZ-cd

tikz-cd

I would like to draw a commutative triangle with tikzcd where the entries have different sizes.

 \[
  \begin{tikzcd}[column sep=15pt]
  \mathcal{C} \ar{rr}  \ar{dr} & & S(\tau) \ar{dl} \\
   & \mathsf{Set} &
  \end{tikzcd}
 \]

This produces a slight asymmetry (the arrow on the right is more slanted, and the middle entry is not in the middle):

enter image description here

One solution is to use the following tikzcd-option:

 cells={nodes={align=center,text width=\widthof{$S(\tau)$}}}

The output looks as follows:

enter image description here

But now the arrow doesn't start at the left entry. How to make this happen?

Best Answer

Update

This feature is mentioned in the TikZ manual, namely III.20.3.2.

\begin{tikzcd}[column sep={1cm,between origins}]
    \mathcal{C}\ar{rr}\ar{dr} && S(\tau,..............)\ar{dl} \\
    & \mathsf{Set}
\end{tikzcd}

Old Answer

The column-separating symbol & accepts an optional argument. Just like \\[6pt] does, &[6] adds the current col sep by 6...pt by default.

\documentclass[tikz,border=9]{standalone}
\usepackage{tikz-cd}
\begin{document}
    \begin{tikzcd}[column sep=15pt]
        \mathcal{C}\ar{rr}\ar{dr} &[6]& S(\tau)\ar{dl} \\
        & \mathsf{Set}
    \end{tikzcd}
\end{document}
Related Question