1

I am using \usepackage{feynmf} to draw Feynman diagrams. However, I have an issue with the labeling of my vertices. For some charts, it puts the vertex label right in the lines. For example, see the following figure for reference. enter image description here

Can someone help me with how to change the location of the labels using the feynmf package? Here is my code to which the above image is output.

    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage{feynmf}

    \begin{document}

    \begin{fmffile}{diagram}
    \begin{fmfgraph*}(120,80)
        \fmfleft{i1}
        \fmfright{o1}
        \fmf{scalar}{i1,a}
        \fmf{scalar}{a,o1}
        \fmfdot{a}
        \fmflabel{$g$}{a}
   \end{fmfgraph*}
   \end{fmffile}

    \end{document}
3
  • 1
    Welcome to TeX.SX. Always attach code. When you post to this site, please always provide a "Minimal Working Example" (MWE) that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document} and compiles without errors, even if it does not produce your desired output.
    – Sandy G
    May 9, 2022 at 23:06
  • You can use \usepackage{feynmp-auto} or \usepackage{feynmp} instead of \usepackage{feynmf} and all work.
    – Sebastiano
    May 10, 2022 at 8:16
  • Also, the feynmf documentation, page 23, explains that in order to control label placement you have to use \fmfv instead of \fmflabel.
    – Miyase
    May 10, 2022 at 8:33

1 Answer 1

1

Here a MWE to resolve your question using \fmfiv command.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{feynmp-auto}

\begin{document}

\begin{fmffile}{diagram}
\begin{fmfgraph*}(120,80)
    \fmfleft{i1}
    \fmfright{o1}
    \fmf{scalar}{i1,i2}
    \fmf{scalar}{i2,o1}
    \fmfdot{i2}
    \fmfiv{l=$g$,l.a=90,l.d=.04w}{c}
    \end{fmfgraph*}
    \end{fmffile}
    \end{document}

enter image description here

You must log in to answer this question.

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