3
$$ 
\begin{array}{c} 
\ovalbox{A} \\
\uparrow \downarrow \\
\ovalbox{B} \\
\uparrow \\
\ovalbox{C} 
\end{array} 
$$ 

(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?

2

1 Answer 1

11

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

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,automata}
\begin{document}
\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);
\end{tikzpicture}
\end{document}

output of code

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .