0

I'm in a rather specific/peculiar situation: For aesthetic reasons, I want certain entries in a tikz-cd diagram to use "large" symbols (in my case, I'm using the \displaystyle version of \varinjlim with a subscript, but this issue work similarly for e.g. large sum signs). At the same time, I want to use symbols instead of some arrows (in my case, I'm using the \cong sign). For this, I use the answer to this question.

Since these symbols do not fill all of the space between rows, the look of the diagram depends quite strongly on their vertical placement. My problem is that the vertical extent of the big symbol in one of the entries is causing a vertical offset between the arrow-replacing symbols in different columns, which looks very ugly. I'm wondering if there is a proper way to correct this---something in the spirit of \mathrlap, perhaps?

This is a minimal working example:

\documentclass{article}
\usepackage{tikz-cd}
\begin{document} 
\begin{tikzcd}
    \displaystyle \sum_\epsilon \ar[draw=none]{d}[sloped,auto=false]{\cong} 
    & A
    \ar[draw=none]{d}[sloped,auto=false]{\cong} \\
    B
    & C
\end{tikzcd}
\end{document}
0

2 Answers 2

1

You can simply \smash the large symbols, and adjust row height if necessary. Additionally, I propose a pstricks solution, based on the psmatrix environment, from pst-node. It allows for a finer control on the position of the label. I suppose it also can be done with TikZ, but I don't know it well enough to do it:

\documentclass{article}
\usepackage{mathtools}
\usepackage{tikz-cd}
\usepackage{pst-node, auto-pst-pdf}

 \begin{document}

\[ \begin{tikzcd}[row sep=0.8cm]
  \displaystyle\smash{\sum_\epsilon} \ar[draw=none]{d}[sloped, auto=false,  near end]{ ≅ }
  & A
  \ar[draw=none]{d}[sloped,auto=false,  near end]{\cong} \\
  B
  & C
  \end{tikzcd}\]

  \[  \begin{psmatrix}[rowsep=0.65cm, colsep=1cm]
    \sum_\epsilon & A \\
    B & C %
    \ncline[linestyle=none]{1,1}{2,1}\ncput*[nrot=:U, npos=0.35]{\cong}
    \ncline[linestyle=none]{1,2}{2,2}\ncput*[nrot=:U, npos=0.6]{\cong}  
    \end{psmatrix}
  \]

\end{document} 

enter image description here

0

I've figured out an ugly, "brute-force" way to work around this. It basically uses a bit of \hspace to align the two symbols, putting them both in the "wrong" place. The vertical alignment is checked by eye Then, a bit of \hspace on both is used to put them in the "correct" position. Note that this method is quite laborious and does not generalize well to larger diagrams, so clearly one should hope for a better solution that this.

The MWE is turned into the following:

\documentclass{article}
\usepackage{tikz-cd}
\begin{document} 
\begin{tikzcd}
    \displaystyle \sum_\epsilon \ar[draw=none]{d}[sloped,auto=false]{\hspace{-0.3cm}\cong} 
    & A
    \ar[draw=none]{d}[sloped,auto=false]{\hspace{-0.3cm}\cong\hspace{-0.435cm}} \\
    B
    & C
\end{tikzcd}
\end{document}

The output looks like this:

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .