2

I have a sequence (of inclusions) that is too long for a single row, so I am forced to split it into two rows. The upper row contains 4 smaller objects (and 1 big one), while the lower row contains 3 much bigger objects. So, if both rows share the column alignment, the upper row gets stretched unnecessarily, even outside the page. This is what I have at the moment:

enter image description here

Notice that at the moment the last object in the upper row is the same as the first object in the lower row, but this is only temporary as I intend to connect both rows with a snake-like arrow.

My problem is that if I put both rows in the same tikzcd environment, the upper row gets stretched to accomodate for the alignment of the lower row. Theoretically, I could split the sequence further, but it seems like a waste of space. Is there a way to connect both rows while each keeps its own column alignment?

Here is the latex code:

    $$
    \begin{tikzcd}
    B_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(VIII)"]{r} & 
    \hat{B}_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(IX)"]{r} & 
    \tilde{B}_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(X)"]{r} &
    B_1^{\mathrm{ind}} bigg(\Big( \prod\limits_{k=1}^N 
    \tilde{\mathrm{pr}}_k(U)^c \times \mathfrak{m}_k\Big)^c,\mathbb{Z}\bigg)
    \arrow[hook,"(XI)"]{r} & 
    B_1^{\mathrm{ind}} (\tilde{U},\mathbb{Z})
    \end{tikzcd}
    $$
    $$
    \begin{tikzcd}
    B_1^{\mathrm{ind}}(\tilde{U},\mathbb{Z}) 
    \arrow[equal,"(XII)"]{r} & 
    \bigcap\limits_{k=1}^N ( \mathrm{pr}_k)^{-1}_\# 
    B_1^{\mathrm{ind}}
    (\tilde{\mathrm{pr}}_k(U)\times \mathfrak{m}_k,\mathbb{Z}) 
    \arrow[equal,"(XIII)"]{r} &
    \bigcap\limits_{k=1}^N ( \tilde{\mathrm{pr}}_k)^{-1}_\# 
    B_1(\tilde{\mathrm{pr}}_k(U),\mathbb{Z}) & 
    B_1(U,\mathbb{Z}) 
    \arrow[hook',"(XIV)",swap]{l}
    \end{tikzcd}
    $$
2

One way to go is to remember the separate tikzcds and to connect them via overlay.

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage[a4paper,left=1cm,top=2cm,bottom=1cm,right=1cm]{geometry}
\usepackage{tikz-cd}
\tikzset{every picture/.append style={remember picture}}
\begin{document}
\[
   \begin{tikzcd}
    B_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(VIII)"]{r} & 
    \hat{B}_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(IX)"]{r} & 
    \tilde{B}_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(X)"]{r} &
    B_1^{\mathrm{ind}} bigg(\Big( \prod\limits_{k=1}^N 
    \tilde{\mathrm{pr}}_k(U)^c \times \mathfrak{m}_k\Big)^c,\mathbb{Z}\bigg)
    \arrow[hook,"(XI)"]{r} & |[alias=tr]|
    B_1^{\mathrm{ind}} (\tilde{U},\mathbb{Z})
    \end{tikzcd}
\]
\[  
    \begin{tikzcd}
    B_1^{\mathrm{ind}}(\tilde{U},\mathbb{Z}) 
    \arrow[equal,"(XII)"]{r} & 
    \bigcap\limits_{k=1}^N ( \mathrm{pr}_k)^{-1}_\# 
    B_1^{\mathrm{ind}}
    (\tilde{\mathrm{pr}}_k(U)\times \mathfrak{m}_k,\mathbb{Z}) 
    \arrow[equal,"(XIII)"]{r} &
    \bigcap\limits_{k=1}^N ( \tilde{\mathrm{pr}}_k)^{-1}_\# 
    B_1(\tilde{\mathrm{pr}}_k(U),\mathbb{Z}) & |[alias=br]|
    B_1(U,\mathbb{Z}) 
    \arrow[hook',"(XIV)",swap]{l}
    \end{tikzcd}
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[-latex] (tr.east) to[out=0,in=0] (br.east);
\end{tikzpicture}
\end{document}

enter image description here

EDIT: Additional arrow.

\documentclass{article}
\usepackage{amsmath,amssymb}
\usepackage[a4paper,left=1cm,top=2cm,bottom=1cm,right=1cm]{geometry}
\usepackage{tikz-cd}
\tikzset{every picture/.append style={remember picture}}
\begin{document}
\[
   \begin{tikzcd}
    B_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(VIII)"]{r} & 
    \hat{B}_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(IX)"]{r} & 
    \tilde{B}_1^{\mathrm{ind}}(U,\mathbb{Z}) 
    \arrow[hook,"(X)"]{r} &
    B_1^{\mathrm{ind}} bigg(\Big( \prod\limits_{k=1}^N 
    \tilde{\mathrm{pr}}_k(U)^c \times \mathfrak{m}_k\Big)^c,\mathbb{Z}\bigg)
    \arrow[hook,"(XI)"]{r} & |[alias=tr]|
    B_1^{\mathrm{ind}} (\tilde{U},\mathbb{Z})
    \end{tikzcd}
\]
\[  
    \begin{tikzcd} |[alias=bl]|
    B_1^{\mathrm{ind}}(\tilde{U},\mathbb{Z}) 
    \arrow[equal,"(XII)"]{r} & 
    \bigcap\limits_{k=1}^N ( \mathrm{pr}_k)^{-1}_\# 
    B_1^{\mathrm{ind}}
    (\tilde{\mathrm{pr}}_k(U)\times \mathfrak{m}_k,\mathbb{Z}) 
    \arrow[equal,"(XIII)"]{r} &
    \bigcap\limits_{k=1}^N ( \tilde{\mathrm{pr}}_k)^{-1}_\# 
    B_1(\tilde{\mathrm{pr}}_k(U),\mathbb{Z}) & |[alias=br]|
    B_1(U,\mathbb{Z}) 
    \arrow[hook',"(XIV)",swap]{l}
    \end{tikzcd}
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[-latex] (tr.east) to[out=0,in=0] (br.east);
\draw[-latex] (tr.east) to[out=0,in=180,looseness=1.6] (bl.west);
\end{tikzpicture}
\end{document}

enter image description here

  • Thanks and sorry about forgetting to include the preamble (the geometry part, in particular). You are a real livesaver today :-) I would be interested in finding out also about the other ways to accomplish this (as I am researching now the code you posted) if you have further suggestions since you say this is one possible way to do it. – M.G. Jul 24 '18 at 19:34
  • @M.G. Well, if you could point to something that you wish to have improved, I will be happy to look for a solution. – user121799 Jul 25 '18 at 7:27
  • I am not really looking to improve anything, I am just trying to learn more about tikz, incl. obtaining the same result in different ways. – M.G. Jul 25 '18 at 8:49
  • @M.G. To me this sounds a bit like solving the same cross word puzzle again. ;-) As long as you like the out put (of course with a backslash before bigg ;-) I think that is the most straightforward way to go. – user121799 Jul 25 '18 at 12:48
  • I see, thanks for taking the time. I have a follow-up question: if I want to connect the last object of the upper row with the first object of the lower row via a snake-like arrow going between both rows, how should I draw the arrow? I have tried \draw[-latex] (tr.south) to[out=-90,in=90] (br.north);, but it produces a wobly line that intersects both rows (pictures). – M.G. Jul 26 '18 at 1:03

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.