[Tex/LaTex] Tikzcd diagrams vs. amscd

diagramstikz-pgf

I am a bit new to tikz environment, but following the advices of the good experts of this site I am trying to replace all my commutative diagrams built with the amscd package with ones built with the tikzcd package.

Unfortunately, I notice the choice by default of the arrow lengths in tickcd IMHO looks less nice than the one in amscd in some instances.

Here is an MWE

\documentclass[11pt]{amsart}
\usepackage{amscd}

\usepackage{tikz-cd}

\begin{document}

\[\begin{CD}
    \kappa(q)=B_{q}/qB_{q}@<<< B_{q}\\
    @AAA @AAA\\
    B\otimes \kappa(p)=B_{p}/pB_{p}@<<< B\otimes A_{p}\\
    @AAA @AAA \\
    \kappa(p)=A_{p}/pA_{p}@<<< A_{p}
\end{CD}\]

\[\begin{tikzcd}
\kappa(q)=B_{q}/qB_{q}& B_{q}\ar[l]\\
B\otimes \kappa(p)=B_{p}/pB_{p}\ar[u]& B\otimes A_{p}\ar[u]\ar[l]\\
\kappa(p)=A_{p}/pA_{p}\ar[u]&A_{p}\ar[u]\ar[l]
\end{tikzcd}\]

\end{document} 

Here is my question : I know I can fiddle with the length of each of the horizontal arrows in the tikzcd diagram, in order to have them neatly aligned and roughly the same, like they appear in the amscd package (that seems to choose the minimum length of the horizontal arrows in a column). I want to have this behavior by default at the level of the whole diagram, or/and the document. What should I do ?

Edit : following the advice of egreg, now I just would like to know if there is a default parameter in tikzcd for a diagram and / or the whole document to allow more spaces between arrows tails and tips and nodes (the opposite of cramped option?)? I do not see that in the documentation.

Best Answer

As egreg mentions in his comment, tikz-cd makes the arrows extend to fill the available space and (I agree with him) this is a desirable feature.

Regarding the second part of the question, you can use \tikzcdset to pass options to the path /tikz/commutative diagrams so they will affect all tikzcd diagrams; in the case of your question, you can use shorten:

\tikzcdset{
  shorten >= 5pt,
  shorten <= 5pt,
}

A complete example:

\documentclass[11pt]{amsart}
\usepackage{amscd}
\usepackage{tikz-cd}

\tikzcdset{
  shorten >= 5pt,
  shorten <= 5pt,
}

\begin{document}

\[\begin{CD}
    \kappa(q)=B_{q}/qB_{q}@<<< B_{q}\\
    @AAA @AAA\\
    B\otimes \kappa(p)=B_{p}/pB_{p}@<<< B\otimes A_{p}\\
    @AAA @AAA \\
    \kappa(p)=A_{p}/pA_{p}@<<< A_{p}
\end{CD}\]

\[\begin{tikzcd}
\kappa(q)=B_{q}/qB_{q}& B_{q}\ar[l]\\
B\otimes \kappa(p)=B_{p}/pB_{p}\ar[u]& B\otimes A_{p}\ar[u]\ar[l]\\
\kappa(p)=A_{p}/pA_{p}\ar[u]&A_{p}\ar[u]\ar[l]
\end{tikzcd}\]

\end{document}

enter image description here

If you want to use this options locally, use them in the optional argument of tikzcd:

\documentclass[11pt]{amsart}
\usepackage{amscd}
\usepackage{tikz-cd}

\begin{document}

\[\begin{CD}
    \kappa(q)=B_{q}/qB_{q}@<<< B_{q}\\
    @AAA @AAA\\
    B\otimes \kappa(p)=B_{p}/pB_{p}@<<< B\otimes A_{p}\\
    @AAA @AAA \\
    \kappa(p)=A_{p}/pA_{p}@<<< A_{p}
\end{CD}\]

\[\begin{tikzcd}[  shorten >= 5pt,shorten <= 5pt]
\kappa(q)=B_{q}/qB_{q}& B_{q}\ar[l]\\
B\otimes \kappa(p)=B_{p}/pB_{p}\ar[u]& B\otimes A_{p}\ar[u]\ar[l]\\
\kappa(p)=A_{p}/pA_{p}\ar[u]&A_{p}\ar[u]\ar[l]
\end{tikzcd}\]

\end{document}
Related Question