2
    $$\begin{tikzcd} A\ar[r,shift left,"f"] 
&\ar[l,shift left,"h"] B\ar[r,shift left,"g"] 
&\ar[l,shift left,"l"]\ar[l,bend left, shift left,"h"] 
C\end{tikzcd}$$ 

enter image description here

This is almost as I'd like it to be, except that the $h$ arrow is going from $C$ to $B$ rather than from $C$ to $A$. How can I modify the code so it does that?

EDIT: accidentally called two arrows 'h'. This was not intentional, but I think the text makes it clear which one I'm referring to.

1 Answer 1

4

Use ll in \ar[ll,bend left, shift left,"h"]. Two ls mean that the arrow should go two positions to the left.

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
      \[\begin{tikzcd} A\ar[r,shift left,"f"]
            &\ar[l,shift left,"h"] B\ar[r,shift left,"g"]
            &\ar[l,shift left,"l"]\ar[ll,bend left, shift left,"h"] C
        \end{tikzcd}
      \]
\end{document}

enter image description here

6
  • And in LaTeX, don't use $$...$$, use \[...\] as the saying goes....
    – user11232
    Oct 18, 2015 at 12:09
  • That's for the answer. But what's the advantage of [ \backslash [...\backslash ]]? Oct 18, 2015 at 12:25
  • @man_in_green_shirt: Please see: Why is \[ ... \] preferable to $$ ... $$?
    – user11232
    Oct 18, 2015 at 12:31
  • Had never heard of that. Thanks, will be sure to use it in the future! Oct 18, 2015 at 12:35
  • 1
    @man_in_green_shirt $ are plain TeX primitives. $f$ will be \(f\) in LaTeX and $$f$$ will be \[f\]. However, $f$ is more widely used and doesn't have much drawbaacks as its $$ cousin.
    – user11232
    Oct 18, 2015 at 13:48

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.