% !TEX program = pdflatexmk
% !TEX parameter = -shell-escape
% Author: Izaak Neutelings (March 2025)
% Instructions: To compile via command line, run the following twice
%   pdflatex -shell-escape tension.tex
\documentclass[11pt,border=-2pt,multi=page,crop]{standalone}
\usepackage{feynmp-auto}
\usepackage{pgffor} % for \foreach
\usepackage{xcolor} % for \color

% DEFINE fmfpicture ENVIRONMENT
\usepackage{environ} % for \NewEnviron
\NewEnviron{fmfpicture}[3]{%
  \begin{page}% to create standalone page
    \fmfframe(#1)(#2){% padding (L,T)(R,B)
    \begin{fmffile}{feynmp-#3}% auxiliary files (use unique name!)
      \BODY % main code
    \end{fmffile}%
    }% close \fmfframe
  \end{page}%
}

% INDICATE VERTICES
\renewcommand{\familydefault}{\ttdefault} % default font
\newcommand{\showfmf}[2]{\color{red}\textbackslash fmf\{#1\}\{#2\}} % \fmf
\newcommand{\showvertices}[1]{%
  \foreach \v/\a in {#1}{%
    \begingroup\edef\tmpcmd{\endgroup\noexpand\fmfv{%
      d.sh=circle,d.f=full,d.si=2,f=(.9,,.2,,.2),l.d=4,%
      label=\noexpand\color{red}\noexpand\tiny\noexpand\texttt{\v},l.a=\a}{\v}}%
    \tmpcmd% excute
  }% close \foreach
}

\begin{document}

% BASIC: without tension
\begin{fmfpicture}{-3,3}{3,3}{basic} % padding (LTRB)
  \begin{fmfgraph*}(120,80) % dimensions (WH)
    % external vertices
    \fmfstraight
    \fmfleft{i2,i1}
    \fmfright{o2,o1}
    % main
    \fmf{fermion}{i1,v1,o1}
    \fmf{fermion}{o2,v2,i2}
    \fmf{photon}{v1,v2} % t-channel
  \end{fmfgraph*}
\end{fmfpicture}

% TENSION
\begin{fmfpicture}{7,6}{13,6}{basic-highlighted} % padding (LTRB)
  \tiny
  \begin{fmfgraph*}(120,80) % dimensions (WH)
    % external vertices
    \fmfstraight
    \fmfleft{i2,i1}
    \fmfright{o2,o1}
    % main
    \fmf{fermion}{i1,v1,o1}
    \fmf{fermion}{o2,v2,i2}
    \fmf{photon}{v1,v2} % t-channel
    % indicate lines
    \fmfiv{l=\showfmf{photon}{v1,,v2},l.d=4,l.a=0}{(0.5w,0.5h)}
    \fmfiv{l=\showfmf{fermion}{i1,,v1,,o1},l.d=0,l.a=-90}{(0.5w,1.01h)}
    \fmfiv{l=\showfmf{fermion}{o2,,v2,,i2},l.d=0,l.a=-90}{(0.5w,-0.01h)}
    % indicate vertices
    \showvertices{i1/160,i2/-160,v1/90,v2/-90,o1/20,o2/-20}
  \end{fmfgraph*}
\end{fmfpicture}

% TENSION
\begin{fmfpicture}{-2,3}{3,3}{tension} % padding (LTRB)
  \begin{fmfgraph*}(120,70) % dimensions (WH)
    % external vertices
    \fmfstraight
    \fmfleft{i2,i1}
    \fmfright{o2,o1}
    % main
    \fmf{fermion,tension=2}{i1,v1} % make shorter
    \fmf{fermion}{v1,o1}
    \fmf{fermion}{v2,i2}
    \fmf{fermion,tension=2}{o2,v2} % make shorter
    \fmf{photon,tension=0.5}{v1,v2} % make longer
  \end{fmfgraph*}
\end{fmfpicture}

% TENSION
\begin{fmfpicture}{7,6}{13,6}{tension-highlighted} % padding (LTRB)
  \tiny
  \begin{fmfgraph*}(120,70) % dimensions (WH)
    % external vertices
    \fmfstraight
    \fmfleft{i2,i1}
    \fmfright{o2,o1}
    % main
    \fmf{fermion,t=2,label=\color{red}tension=2,l.d=5,l.s=right}{i1,v1} % make shorter
    \fmf{fermion}{v1,o1}
    \fmf{fermion}{v2,i2}
    \fmf{fermion,t=2,label=\color{red}tension=2,l.d=5,l.s=right}{o2,v2} % make shorter
    \fmf{photon,t=0.5,label=\color{red}tension=0.5,l.d=4}{v1,v2} % make longer
    % indicate vertices
    \showvertices{i1/160,i2/-160,v1/90,v2/-90,o1/20,o2/-20}
  \end{fmfgraph*}
\end{fmfpicture}

\end{document}