3

My goal is to have a simple diagram with A followed by a right arrow to B followed by two 45 degree arrows, one which branches up to C, and which branches down to D. Can anyone please help me repair the following code, which gives an error? Thanks in advance for your help.

\begin{tikzcd}
                                      & C \\
A \arrow[r] & B \arrow[ur] \arrow[dr] & \\
                                      & D
\end{tikzcd}
  • 2
    Welcome to the site. A few pointers for your first time. (1) good idea to always post full but minimal self contained examples, those are easier for others to copy and test as is. Here we have to come up with a document class and preamble. (2) also a good idea to cite the error message you get. (3) aren't this suppose to be a 3x3 grid? You're missing &s on the first and last row, there should be the same number of & on each line, otherwise there is no target for the ur and dr arrows, right now the targets in row 1 and 3 are just col 1 and 2 – daleif Dec 5 '19 at 19:16
7

Put C and D in the right column:

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}
                       & & C \\
A \arrow[r] & B \arrow[ur] \arrow[dr] & \\
                    & & D
\end{tikzcd}

\end{document} 

enter image description here

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.