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 write a code for Feynman diagrams with TikZ (I know it is a common subject in the forum). I found very useful posts. However, I would like to draw a curved waved line




  \path [draw=blue]
    (-4,0) -- (-2,0) -- (2,0) -- (4,0);
  \draw[draw=blue,snake=coil, segment aspect=0] (2,0) arc (0:180:2cm);


The above code just draw a solid line, no waved.

Can anyone help me solve this weird behaviour?

share|improve this question
You aren't invoking the decorations. A decoration needs to be defined (usually via the decoration key) and invoked, via the decorate key. – Loop Space Jan 2 '13 at 14:56
up vote 14 down vote accepted

Actually the library snakes has been superseded by decorations, but for your need I think you are just looking for decorations.pathmorphing.

Thus, your code revised, is like:


\tikzset{snake it/.style={decorate, decoration=snake}}

  \path [draw=blue,snake it]
    (-4,0) -- (-2,0) -- (2,0) -- (4,0);
  \draw[draw=blue, snake it] (2,0) arc (0:180:2cm);

Notice that I grouped in a single style snake it the keys that really set up the decoration decorate and the one that sets the type of decoration decoration=snake.

For further details, you can have a look to section 72 Decorations and more specifically to section 30.2 Path Morphing Decorations on the pgfmanual. (section 48.2 in pgfmanual 3.0)

share|improve this answer
Thank you @claudio, your answer was very helpful!! Cheers – Dox Jan 2 '13 at 15:26

The new TikZ-Feynman package (see also the project page) makes it easy to create Feynman diagrams.

The following is just an example to show its capabilities. The relevant key to produce the half circle is half left. You have to compile with lualatex in order to exploit the automatic positioning of vertices.

\feynmandiagram [layered layout, horizontal=a to d] {
  a -- [scalar,red] b -- [fermion,blue] c -- [gluon,orange] d,
  b -- [photon, half left] c, % this produces the curved photon line

enter image description here

share|improve this answer

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.