Take the 2-minute tour ×
\ovalbox{A} \\
\uparrow \downarrow \\
\ovalbox{B} \\
\uparrow \\

(The fancybox package is used here, so that \ovalbox{B} appears as a capital B in a box with curved corners.)

This is a crude sort of picture of a simple directed graph, and although all I need is something simple like this, I also was to be able to show an arrow pointing from \ovalbox{B} to itself, set to the right of \ovalbox{B}. How can I do that?

share|improve this question
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). Also, it's usually preferable to post a complete minimal document instead of a code fragment. –  Alan Munn Apr 15 '12 at 19:16
For looking up symbols, see “How to look up a symbol?”. However, like Alan, I would suggest using TikZ for this sort of thing. The second tutorial in the manual (pgfmanual.pdf) should contain everything you need. Also see tex.stackexchange.com/questions/503/why-is-preferable-to –  Caramdir Apr 15 '12 at 19:55
add comment

1 Answer

up vote 10 down vote accepted

I'm not sure the way you're doing this is ideal. I would suggest using the TikZ automata library:

\begin{tikzpicture}[every state/.style={draw,rectangle, rounded corners},node distance=2em]
\node[state] (A) {A};
\node[state] (B) [below=  of A] {B};
\node[state] (C) [below= of B] {C};
\path[thick,-to] (A.-105) edge (B.105)
                 (B) edge (C)
                 (B.75) edge (A.-75)
                 (B) edge [loop right] (B);

output of code

share|improve this answer
add comment

Your Answer


