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.

I want to draw something like this with LaTeX. I know how to draw the two straight arrows, but how can I make the bottom shaped arrow?

enter image description here

share|improve this question
    
I was going to suggest using dot as an alternative, but sometimes dot has problems with where to put labels on edges. –  David Hammen May 6 at 2:29

4 Answers 4

up vote 8 down vote accepted

Something likes this. In particular, the anlge 30 can be changed to suit one's need.

\draw[->,>=stealth] (a) edge[bend right=zz]node[below]{C} (c);
\draw[->,>=stealth] (a) edge[out=xx, in=yy]node[below]{C} (c);

enter image description here

Code

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{positioning,arrows}
\begin{document}
\begin{tikzpicture}
\node at (0,0) (a) {a};
\node[right =1cm of a]  (b){b};
\node[right =1cm of b]  (c){c};
\draw[->,>=stealth] (a) --node[above]{A} (b);
\draw[->,>=stealth] (b) --node[above]{B} (c);
\draw[->,>=stealth] (a) edge[bend right=30]node[below]{C} (c);
\end{tikzpicture}
\end{document}
share|improve this answer
    
Exactly what I was looking for. Thank you very much. –  magu_ May 5 at 12:45
    
You are welcome. –  Jesse May 5 at 12:47

Using the powerful tikz-cd is a one-liner:

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

\begin{document}

\begin{tikzcd}
a\ar[r,"A"]\ar[rr,out=-30,in=210,swap,"C"] & b\ar[r,"B"] & c
\end{tikzcd}

\end{document}

enter image description here

Another option, with the graphs and quotes libraries from TikZ as suggested by Henri Menke:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs,quotes}

\begin{document}

\tikz \graph[multi] {a->["A"] b ->["B"] c; a->[bend right,"C" below] c; };

\end{document}

enter image description here

share|improve this answer
    
Also a very nice way to do. It is especially saving key strokes. –  magu_ May 5 at 12:46
    
@magu_ Besides saving key strokes, tikz-cd was specifically designed for easily drawing commutative diagrams. –  Gonzalo Medina May 5 at 12:48
    
Can this also be done using the graph library? –  Henri Menke May 5 at 12:53
1  
@HenriMenke Yes, it can be done. I added an example to my answer (I cannot upload images right now). Thnaks for the suggestion. –  Gonzalo Medina May 5 at 13:21
1  
@GonzaloMedina Thank you! I added the picture for you in return. –  Henri Menke May 5 at 13:47

Run with xelatex

\documentclass{article}
\usepackage{pst-node}
\psset{shortput=nab,arrows=->,nodesep=2pt}
\begin{document}

\Rnode{a}{a}\qquad\Rnode{b}{b}\qquad\Rnode{c}{c}
\ncline{a}{b}^{A}\ncline{b}{c}^{B}
\nccurve[angleA=-45,angleB=225]{a}{c}_{C}

\end{document}

enter image description here

share|improve this answer

A MetaPost solution, making use of the boxes package. More verbose, obviously, than the tikz and pstricks solutions, but efficient all the same. To be run with LuaLaTeX.

\documentclass{standalone}
\usepackage{luamplib}
  \mplibsetformat{metafun}
  \mplibtextextlabel{enable}
\begin{document}
\begin{mplibcode}
  input boxes;
  u := 2cm;
  beginfig(1);
    boxjoin(a.e + (u, 0) = b.w;);
    boxit.a("$a$"); drawunboxed(a);
    boxit.b("$b$"); drawunboxed(b);
    boxit.c("$c$"); drawunboxed(c);
    path ab, bc, ac; 
    ab = a.e -- b.w; drawarrow ab; label.top("$A$", point 0.5 of ab);
    bc = b.e -- c.w; drawarrow bc; label.top("$B$", point 0.5 of bc);
    ac = a.se .. c.sw{dir 30}; drawarrow ac; label.bot("$C$", point 0.5 of ac);
    setbounds currentpicture to boundingbox currentpicture enlarged 3bp;
  endfig;
\end{mplibcode}
\end{document}

enter image description here

share|improve this answer

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.