I've asked before about the easiest way to normalize entry sizes in tikzcd but feel like I still don't understand the best practices to draw a relatively symmetric diagram with widely divergent entry sizes. (By "symmetric" I mean that I'd like to be able to ensure that the overall shape is a square (or rotated square) and that composable diagonal arrows are actually parallel, when appropriate.)
Here's an example that I've attempted to normalize in three different ways, using various tricks that I've learned on this site.
I understand attempt 1 the best: \makebox is used to spoof the entry size and shorten is used to adjust the length of the arrows. But in practice, this approach feels to ad hoc.
It's been suggested elsewhere to use between origins as I've done in attempt 2, but I don't understand what this actually does, or what my other options might be. In practice this seems to look great half the time and terribly the other half of the time (or half great and half terribly like here).
The third attempt I understand even less. Basically I'm looking for someone to give a quick tutorial on different potential techniques. This is one of hundreds of diagrams, so I need a solution I can modify to many other settings with different diagram shapes.
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usepackage{makebox}
\begin{document}
Attempt 1:
\[
\begin{tikzcd}[column sep=0em, row sep=small]
& & \hom_A(a,A) \underset{X}{\times} \hom_B(B,b) \arrow[dl, two heads, "\pi_1"'] \arrow[dd, phantom, "\rotatebox{135}{$\ulcorner$}" pos=.1] \arrow[dr, two heads, "\pi_0"] \\
& \hom_A(a,A) \arrow[dl, two heads, "p_1"', shorten >=-1em] \arrow[dr, two heads, "p_0"] & & \hom_B(B,b) \arrow[dl, two heads, "p_1"'] \arrow[dr, two heads, "p_0", shorten >=-1em] \\
\makebox*{$\hom_A(a,A)A$}{$A$} & & X & & \makebox*{$A\hom(a,A)_A$}{$B$}
\end{tikzcd}
\]
Attempt 2:
\[
\begin{tikzcd}[column sep={4em,between origins}]
& & \hom_A(a,A) \underset{X}{\times} \hom_B(B,b) \arrow[dl, two heads, "\pi_1"'] \arrow[dd, phantom, "\rotatebox{135}{$\ulcorner$}" pos=.1] \arrow[dr, two heads, "\pi_0"] \\
& \hom_A(a,A) \arrow[dl, two heads, "p_1"'] \arrow[dr, two heads, "p_0"] & & \hom_B(B,b) \arrow[dl, two heads, "p_1"'] \arrow[dr, two heads, "p_0"] \\
\makebox*{$\hom_A(a,A)A$}{$A$} & & X & & \makebox*{$A\hom(a,A)_A$}{$B$}
\end{tikzcd}
\]
Attempt 3:
\[
\begin{tikzcd}[nodes in empty cells, column sep=-3ex, row sep=1em, cells={nodes={minimum width=1em, inner sep=1pt}}]
& & \hom_A(a,A) \underset{X}{\times} \hom_B(B,b) \arrow[dl, two heads, "\pi_1"'] \arrow[dd, phantom, "\rotatebox{135}{$\ulcorner$}" pos=.1] \arrow[dr, two heads, "\pi_0"] \\
& \hom_A(a,A) \arrow[dl, two heads, "p_1"'] \arrow[dr, two heads, "p_0"] & & \hom_B(B,b) \arrow[dl, two heads, "p_1"'] \arrow[dr, two heads, "p_0"] \\
\makebox*{$\hom_A(a,A)A$}{$A$} & & X & & \makebox*{$A\hom(a,A)_A$}{$B$}
\end{tikzcd}
\]
\end{document}




eminstead ofmm, but if you're not thinking of changing fonts then there should be no problem usingmm. – Luis Turcio Aug 12 '20 at 15:28