4

Consider the following piece of code

\begin{equation*}
    \feynmandiagram [medium, vertical=e to f] {
        a -- [photon] b [particle={\(\nu\)}] -- [fermion, edge label=\(k_{2}\)] c [particle={\(\rho\)}] -- [photon] d,
        b  -- [anti fermion, edge label'=\(k_{1}\)] e [particle={\(\mu\)}] -- [anti fermion, edge label'=\(k_{3}\)] c,
        e -- [photon] f,
    };
    \qquad \text{and} \qquad
    \feynmandiagram [medium, vertical=e to f] {
        a -- [photon] b [particle={\(\nu\)}] -- [anti fermion, edge label=\(-k_{2}\)] c [particle={\(\rho\)}] -- [photon] d,
        b  -- [fermion, edge label'=\(-k_{1}\)] e [particle={\(\mu\)}] -- [fermion, edge label'=\(-k_{3}\)] c,
        e -- [photon] f,
    };
    \end{equation*}

which generates the output

.

  • How do I make the photon lines shorter?

  • How do I make the text 'and' go in the center of the figure and not in the bottom center of the figure?

  • How I do move the labels mu, nu and rho so that the lines join at vertices?

5

To address each of these points:

  • For the vertical alignment, use the baseline key, as in the example below.

  • For shortening the photons I can't give you an automatic solution that doesn't involve shrinking the middle part as well, but you can move the end points of those lines by using nudge (see the manual for TikZ). I see that the amount of nudging could be fine tuned.

  • Instead of particle=\(nu\), use label=\(\nu\) which places the \nu beside the vertex instead of replacing the vertex with the litter. You can further adjust the positioning of the label with label=<angle>:\(nu\).

output

\documentclass{article}
\usepackage{tikz-feynman,amsmath}
\begin{document}
\begin{equation*}
  \feynmandiagram [baseline={(current bounding box.center)},medium, vertical=e to f] {
    a [nudge=(-30:5mm)]
    -- [photon] b [label=60:\(\nu\)]
    -- [fermion, edge label=\(k_{2}\)] c [label=-30:\(\rho\)]
    -- [photon] d[nudge=(210:5mm)],
    b
    -- [anti fermion, edge label'=\(k_{1}\)] e [label=180:\(\mu\)]
    -- [anti fermion, edge label'=\(k_{3}\)] c,
    e -- [photon] f[nudge up=10mm],
  };
  \qquad \text{and} \qquad
  \feynmandiagram [baseline={(current bounding box.center)},medium, vertical=e to f] {
    a [nudge=(-30:5mm)]
    -- [photon] b [label=60:\(\nu\)]
    -- [anti fermion, edge label=\(-k_{2}\)] c [label=-30:\(\rho\)]
    -- [photon] d[nudge=(210:5mm)],
    b
    -- [fermion, edge label'=\(-k_{1}\)] e [label=180:\(\mu\)]
    -- [fermion, edge label'=\(-k_{3}\)] c,
    e -- [photon] f[nudge up=10mm],
  };
\end{equation*}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.