2

I am trying to draw a diagram similar to this

enter image description here

but my background is so basic I can not draw complected Tikz diagrams, the best I can come up with is the following:

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
1 \arrow{rrr}{a}  
\arrow[swap]{ ddd}{ h} & & & 2 \arrow{ddd}{g} \\
& 3 \arrow{r}{c}
\arrow{d}{d}
\arrow{ul}{0}
& 4 \arrow{d}{e} 
\arrow{ur}{00}& \\
& 5 \arrow{r}{f}
\arrow{dl}{00}
& 6  \arrow{dr}{0}& \\
7 \arrow[swap]{rrr}{b} & & & 8
\end{tikzcd}
\end{document} 

enter image description here

I'll appreciate any help, Thanks.

2
  • Welcome to TeX SE! So basically you want the diagram to appear like the top image, but using the labels from the bottom one?
    – Alenanno
    Aug 13, 2016 at 10:40
  • @Alenanno. Yes.
    – Senior
    Aug 13, 2016 at 10:46

1 Answer 1

3

Did you want something like this? The diagonal arrows in the outer rim are not like those in your first image, but since you had added them yourself, I left them as they were.

Output

enter image description here

Code

\documentclass[margin=10pt]{standalone}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
1 \arrow{rrrrr}{a} \arrow[swap]{dddd}{h} & & & & & 2 \arrow{dddd}{g} \\
& 3 \arrow{rr}{c} \arrow{dd}{d} \arrow{ul}{0} & & 4 \arrow{dd}{e} \arrow{dl} \arrow{urr}{00}& \\
& & Y & & \\
& 5 \arrow[""{name=F, anchor=center}]{rr}{f} \arrow{ur} \arrow{dl}{00} & & 6 \arrow{drr}{0} \arrow[dashed]{ul} & \\
7 \arrow[swap]{rrrrr}{b} & & & & & 8 
\arrow[to=F, dashed, -] \arrow[from=F, dashed]{uulll}
\end{tikzcd}
\end{document} 

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.