5

enter image description here

I am having a hard time with the following commutative diagram. Mostly, I am not sure how to align the middle row correctly. Currently this is my best attempt.

I cannot get the code to compile upon deleting that unwanted $N_n$ (this is only a sort of dummy so that the code will compile). Also, I can't get the diagram to align nicely as in the picture.

\documentclass[border=10pt,tikz]{standalone}
\usepackage{tikz-cd}
\begin{document}
 \begin{tikzcd} 
 C_{n+1} \arrow{r} \arrow{dr} & B_n \arrow{d} \arrow{r} & C_n \arrow{r} \arrow{d} &  B_{n-1}  \\ 
 &  A_n \arrow{r} \arrow{d} & A_{n-1} \arrow{r} & N_n  \\
E_{n+1} \arrow{r}  &  D_n \arrow{r} & E_n \arrow{r} &  D_{n-1}    
 \end{tikzcd}
\end{document}
  • Welcom to SE! Please, be so kind and show, what you tried so far. – Zarko Nov 24 '15 at 1:35
  • Good to see some code. Could you help us by making it so it compiles, too? – cfr Nov 24 '15 at 2:01
  • I think that you cannot start with an arrow. – cfr Nov 24 '15 at 2:12
  • I could live without the arrows at the beginning. – akgjh Nov 24 '15 at 2:14
  • I should have said: can you make it a complete document rather than can you make it compile. Also good to explain if not-compiling is the problem - then your code should produce the error you want help with when somebody tries to compile it. – cfr Nov 24 '15 at 2:32
5
\arrow{d}

means go one-below. So there must be something there.

\arrow{dd}

means go two-below.

A cell cannot start with an arrow and then have something in it. So

\arrow{r} C

is no good but

\arrow{r} & C

is fine.

cd diagram

Complete code:

\documentclass[border=10pt,tikz]{standalone}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
  \arrow{r} & C_{n+1} \arrow{dd} \arrow{dr} & & B_n \arrow{dd} \arrow{r} & C_n \arrow{dd} \arrow{dr} & & B_{n-1} \arrow{r} \arrow{dd} & {}\\
  & & A_n \arrow{ur} \arrow{dr} & & & A_{n-1} \arrow{ur} \arrow{dr} \\
  \arrow{r} & E_{n+1} \arrow{ur} & &  D_n \arrow{r} & E_n \arrow{ur} & & D_{n-1} \arrow{r} & {}
\end{tikzcd}
\end{document}
  • Sorry about not posting the complete code. I will know from now on to do this. – akgjh Nov 24 '15 at 2:45
  • @akgjh I made it worse by posting a misleading request so it is probably more my fault than yours. I could see later by your edit that you tried to do it. I just put it wrongly. (I thought your diagram just looked wrong - I didn't realise you had compilation errors. And 'make it compilable' is often clearer than 'minimally complete it' ;).) I'm sorry to have been confusing. – cfr Nov 24 '15 at 2:56

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.