TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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 have this simple Feynman diagram with a circle:

enter image description here

I would like to put the number "1" in the middle of that circle.

I've tried these:

  • \fmfiv{lab=1}{c}
  • \fmfiv{lab=1}{.5[nw,se])
  • \fmfiv{lab=1}{(.4999w, .5h)}
  • \fmfiv{lab=1}{(.5001w, .5h)}

but whatever constants I put, latex refuses to put it INSIDE the circle.

The latex:

\documentclass[24pt]{article}
\usepackage{amsmath,amsfonts,epsf}
\usepackage{amssymb}
\usepackage[pdftex]{graphicx}
\usepackage{grffile}
\usepackage{feynmp-auto}

\begin{document}

    \begin{fmffile}{2ptcorrection1}
    \begin{fmfgraph*}(220,12)
    \fmfpen{thick}
    \fmfleft{i1}
    \fmfright{o1}
    \fmf{plain}{i1,v1}
    \fmf{dashes, left=1, tension=0.3}{v1,v2}
    \fmf{plain, right=1, tension=0.3}{v1,v2}
    \fmf{plain}{v2,o1}
    \end{fmfgraph*}
    \end{fmffile}

\end{document}

btw, the coordinates are: "c" for center, sw, se, ne, nw.

Update: thank you hftf for the answer.

share|improve this question
up vote 11 down vote accepted

I was able to make the label appear to be in the center of the circle by using a phantom (invisible) edge across the circle and setting the label.dist to 0 to place the label in the middle of that edge.

\documentclass{minimal}
\usepackage{grffile}
\usepackage{feynmp-auto}

\begin{document}

    \begin{fmffile}{2ptcorrection1}
    \begin{fmfgraph*}(220,12)
    \fmfpen{thick}
    \fmfleft{i1}
    \fmfright{o1}
    \fmf{plain}{i1,v1}
    \fmf{dashes, left=1, tension=0.3}{v1,v2}
    \fmf{plain, right=1, tension=0.3}{v1,v2}
    \fmf{plain}{v2,o1}

    % This is where the magic happens:
    \fmf{phantom,label.dist=0,label=1}{v1,v2}

    \end{fmfgraph*}
    \end{fmffile}

\end{document}

And this is what it looks like:

label positioned in the middle of a Feynman diagram circle

share|improve this answer

This can be done also with the new TikZ-Feynman package (see also the project page).

Inside the feynman environment, first you draw the actual diagram within the \diagram macro, then you can use the usual TikZ commands to put labels (the syntax used there requires the calc library, which is loaded b default by TikZ-Feynman). You have to compile with lualatex in order to take advantage of the automatic positioning of the vertices.

\documentclass[tikz]{standalone}
\usepackage{tikz-feynman}
\tikzfeynmanset{compat=1.0.0}
\begin{document}
\begin{tikzpicture}
  \begin{feynman}
    \diagram[layered layout, horizontal=a to d] {
      a --  b,
      b -- [scalar, half left] c -- [half left] b,
      c -- d,
    };
    \node [red] at ($(b)!0.5!(c)$) {1};
  \end{feynman}
\end{tikzpicture}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

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.