Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

In my use of tikz-cd, the down, right and left arrows (\ar{d},\ar{r}, \ar{l} respectively) work fine, but I seem to have no uparrow (nor any up right arrow or up left arrow). When I have \ar{u}, I get the error "No shape named tikz@f@1-0-1 found". Can anyone help me with this?

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}

\begin{tikzcd}
A\ar{u}\\
B
\end{tikzcd}

\end{document}

Replace that u with an l,r or d and it works.

share|improve this question
2  
Please, add a minimal working example (MWE) –  egreg Apr 18 at 14:54

1 Answer 1

up vote 4 down vote accepted

Of course \ar{u} will produce an error with your code since there's no node to go upwards from "A"; as soon as you add a node above "A" you can use an upwards arrow:

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}

\begin{tikzcd}
C \\
A\ar{u}\\
B
\end{tikzcd}

\end{document}

enter image description here

If you just want the arrow pointing upwards from "A" but without ant label at the end, you still have to declare a node with empty contents:

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}

\begin{tikzcd}
{} \\
A\ar{u}\\
B
\end{tikzcd}

\end{document}

enter image description here

share|improve this answer
    
This is the perfect answer. Thank you very much. –  user27575 Apr 18 at 18:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.