TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to make a nice state diagram with some arrows

I cannot find a way to make the arrows pointing to the same state: in my case, I would like a self-refering arrow to altcache

I'm not fixed about the fancybox, but it would nicely fit in the rest of the thesis.

Thanks a lot for your help

Here is an example of code and the result:

enter image description here

I just need a circle dashed arrow at altcache...


  {\doublebox{\text{\begin{minipage}{\boxsize}\centering #1\end{minipage}}}}
  {\ovalbox{\text{\begin{minipage}{\boxsize}\centering #1\end{minipage}}}}


\switch{lscache} \ar@{.>}[d] \ar@{.>}[rdd] &  &\\
\switch{tccache} \ar@{.>}[rd] & & \\
\switch{altcache} & \ar@{.>}[l] \switch{cache}  & \\

share|improve this question
up vote 2 down vote accepted

You can specify the exit/entrance directions by adding @(out,in) to the arrow command, where in and out are two direction specifiers (ul, dl, ur, dr, etc.). In order to create a circular arrow above the box altcache, add @(ul,ur):

  \switch{lscache}  \ar@{.>}[d] \ar@{.>}[rdd] & &\\
  \switch{tccache}  \ar@{.>}[rd]     & & \\
  \switch{altcache} \ar@{.>}@(ul,ur) & \ar@{.>}[l] \switch{cache}  & 

enter image description here

share|improve this answer
Wonderful: thanks a lot! – Louis May 29 '12 at 7:12
You're welcome. :) – Martin May 29 '12 at 10:21

Your Answer


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.