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

How can I create a self loop without a direction on the edge?

\path[every node/.style={font=\sffamily\small}]
(3)   edge[loop] node  {$e_{1}$} (3);

creates the loop I want but has a direction.

share|improve this question
For the latest version of tikz, this can be done simply with \Loop[style={}](A). – user33585 Jul 12 '13 at 23:36
up vote 7 down vote accepted

For some reason, the TikZ every loop style contains an arrow. So you simple have to remove that:

\begin{tikzpicture}[every loop/.style={}]
    \node (3) {(3)};
    \path[every node/.style={font=\sffamily\small}]
        (3)   edge[loop] node  {$e_{1}$} (3);

or remove it globally with

\tikzset{every loop/.style={}}

in the preamble.

share|improve this answer
ty guys for the fast response :D – Bibtex Mar 23 '12 at 17:32
In fact you don't even need the extra ,- on the edge. edge[loop] will suffice if you cleared the every loop style. – Fritz Mar 23 '12 at 17:35
@Fritz: Thanks, I forgot to remove that from my first attempt. – Caramdir Mar 23 '12 at 17:43

There is another possibility. loop and every loop are simple styles and it's possible to redefine loop instead of every loop. It's interesting if you have a lot of loops and if you want some specific options

The code from pgf

% Loops

\tikzstyle{loop}=                    [to path={
  [looseness=8,min distance=5mm,every loop]

\tikzstyle{every loop}=              [->,shorten >=1pt]

My modification

\tikzset{my loop/.style =  {to path={
  [looseness=12,min distance=10mm]

    \node (3) {(3)} ;
    \path  (3)   edge[my loop] node[above]  {$e_{1}$} (3);


enter image description here

share|improve this answer
nice, can I ask how you would let the loop spurt out on a different direction? (usually I use the grow=left option, but it doesn't seem to work) – donkey kong May 24 '12 at 22:36
You need to modify some styles like \tikzstyle{loop left}= [right,out=15,in=-15,my loop] . You need to change loop left with my loop left and 'loop' with my loop. Another possibility is to modify and to keep the names loopand loop left – Alain Matthes May 25 '12 at 5:22
thanks for that – donkey kong May 25 '12 at 20:00

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.