4

It's a simple question which is illustrated as below:

\documentclass[openany,english]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{newtxtext}
\usepackage[nonewtxmathopt]{newtxmath}
\usepackage{amsmath, amssymb, graphicx}
\usepackage[thmmarks, amsmath, thref]{ntheorem}
\usepackage{tikz-cd}

\begin{document}

\[
\begin{tikzcd}[row sep=2.5ex, column sep=2ex]
(FF,FF)_D \ar[rrr] \ar[dd] & & & (FF,FF)_D \ar[dd] & & & &\\
& & & & (FF,FF)_D \ar[rrr, "\alpha_{FFc_1,FFc_2}"] \ar[from=llllu, crossing over] & & & (FF,FF)_D \ar[dd] \ar[from=llllu] \\
(FF,FF)_D \ar[rrr] & & & (FF,FF)_D \ar[rrrrd] & & & &  \\
& & & & (FF,FF)_D \ar[rrr, "\alpha_{FFc_1,FFc_2}"] \ar[from=llllu] \ar[from=uu, crossing over] & & & (FF,FF)_D
\end{tikzcd}
\]
\end{document}

enter image description here

I want the words to come above the arrows so that they are not hidden behind arrows. Of course, I can increase the vertical length or move the words beneath the arrows, but I'm wondering if there is a way of solving the problem without increasing the vertical length of the overall diagram. I've read the short tikzcd manual, but wasn't creative enough to solve this. Any help is welcomed!

3
  • 1
    Why not just place them below the arrow "\alpha_{FFc_1,FFc_2}"{below, yshift=-0.2em}?
    – Benjamin
    Feb 23, 2016 at 6:12
  • Sorry, I've seen it wrong. I think that works but leaves a bit more to be desired. The vertical space needed is almost the same as writing the labels below the arrows for the letters to come above the arrows.
    – Taxxi
    Feb 23, 2016 at 6:35
  • 1
    I see no solution without increasing the width of the arrows bearing the labels. The obvious change, if you don't want to swap the label's position, is to put the “source” square lower than the “target” square.
    – egreg
    Feb 23, 2016 at 8:46

1 Answer 1

3

With your restrictions, there are only two possibilities (IMHO). I dislike both, but here you are:

% arara: pdflatex

\documentclass{scrbook}
\usepackage[nonewtxmathopt]{newtxmath}
\usepackage{tikz-cd}

\begin{document}    
\[
\begin{tikzcd}[%
    ,row sep={6.5ex,between origins}
    ,column sep={8.5em,between origins}
    ]
    (FF,FF)_D \ar[r] \ar[dd] & (FF,FF)_D \ar[dd]\arrow[shorten >= 1.5cm]{drr} &[-2.5em] & \\
    & & (FF,FF)_D \ar{r}{\alpha_{FFc_1,FFc_2}} \ar[from=llu, crossing over] & (FF,FF)_D \ar[dd] \\
    (FF,FF)_D \ar[r]\arrow{drr} & (FF,FF)_D \ar[rrd] & & \\
    & & (FF,FF)_D \ar{r}[fill=white]{\alpha_{FFc_1,FFc_2}} \ar[from=uu, crossing over] & (FF,FF)_D
\end{tikzcd}
\]
\end{document}

enter image description here

You must log in to answer this question.

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