2

I have a small problem with vertical arrows in the diagram below. I would like all three of them to be in the same position and of equal length. Suggestions?

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd,amsmath}

\begin{document}

\begin{tikzcd}
1\rar   & I_E\rar\dar   & G_E\rar\dar   & \widehat Z\rar\dar    & 0 \\
1\rar   & I_F\rar       & G_F\rar       & \widehat Z\rar        & 0 \\
\end{tikzcd}

\end{document}
3

I am not sure about what you mean with "same position". If you want them to be all in equal distance to each other, you should define the column separators by the distance between their origins (centres).

% arara: pdflatex

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}

\begin{document}    
    \begin{tikzcd}[column sep={1.5cm,between origins}]
        1\rar   & I_E\rar\dar   & G_E\rar\dar   & \widehat Z\vphantom{_E}\rar\dar    & 0 \\
        1\rar   & I_F\vphantom{\widehat Z}\rar       & G_F\vphantom{\widehat Z}\rar       & \widehat Z\rar        & 0 \\
    \end{tikzcd}    
\end{document}

enter image description here

0

The \widehat{Z} symbol is higher than the other symbols in the bottom row, so the arrow compensates for this height.

You can pretend the symbol is as high as a G by using a phantom and \smash. In the top row you have to add a phantom subscript.

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd,amsmath}

\begin{document}

\begin{tikzcd}
1\rar   & I_E\rar\dar   & G_E\rar\dar   & \widehat{Z}\vphantom{_E}\rar\dar    & 0 \\
1\rar   & I_F\rar       & G_F\rar       & \vphantom{G}\smash[t]{\widehat{Z}}\rar        & 0 \\
\end{tikzcd}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.