1

Consider the following Feynman diagram:

% !TeX program = lualatex
\documentclass[a4paper,10pt]{article}
\usepackage{amsmath}
\usepackage{tikz-feynman}
\begin{document}
\begin{center}

\feynmandiagram [large, horizontal=a to t1] {
    a  -- [plain,reversed momentum=\(k_1+k_2\)] t1 -- [scalar, momentum'=\(q\),edge label=\(m_1\)] t2 --[plain, momentum'=\(q+k_1\),edge label=\(m_2\)]t3 -- [plain, momentum'=\(q+k_1+k_2\),edge label=\(m_3\)]t1,
    t2 -- [plain,reversed momentum=\(k_1\)] p1 ,
    t3 -- [plain,reversed momentum=\(k_2\)] p2,
};
\end{center}
\end{document}

A Feynman diagram

Now what I want to have is that the dotted edge to become semi-dotted together with a way to specify the orientation.

The transformed image in one of the two possible orientations should look like:

Feynman diagram with modified edge

How to achieve this?

1

On my machine, your code does not reproduce your screenshot, but an upside-down version of it. However, it is rather straightforward to get the "semidashed" line. Just remember the nodes and draw the solid half-line as an overlay.

\documentclass[a4paper,10pt]{article}
\usepackage{amsmath}
\usepackage{tikz-feynman}
\begin{document}
\begin{center}

\feynmandiagram [large, horizontal=a to t1,remember picture] {
    a  -- [plain,reversed momentum=\(k_1+k_2\)] t1 
    -- [scalar, momentum=\(q\),edge label'=\(m_1\)] t2 
    --[plain, momentum=\(q+k_1\),edge label'=\(m_2\)]t3 
    -- [plain, momentum=\(q+k_1+k_2\),edge label'=\(m_3\)]t1,
    t2 -- [plain,reversed momentum=\(k_1\)] p1 ,
    t3 -- [plain,reversed momentum=\(k_2\)] p2,
};
\tikz[overlay,remember picture]{\path (t1) --(t2) coordinate[midway] (m1);
\draw[thick] (m1) --(t2);
}
\end{center}
\end{document}

enter image description here

  • Thanks! But how come it became upside down? This seems really odd. – Subho Jun 19 '18 at 15:01
  • @Subho95 I do not know for sure, but tikz-feynman gets continuously updated. When did you update your TeX distribution for the last time? (I stress that's just a guess.) – marmot Jun 19 '18 at 15:03
  • A while back actually – Subho Jun 19 '18 at 15:09
  • Is there a way to make a cleaner diagram? This one will work but the edge looks jagged. – Subho Jun 19 '18 at 15:14
  • @Subho95 To tell you the truth, I do not use the layout algorithms myself because I find them hard to control (plus you can't upload these on the arXiv yet). Almost the same diagram without the automatic layout can be found e.g. here (except that the OP asked me to spoil it afterwards ;-). It would be much nicer if one could adjust the tension between the vertices (which should be possible, but I never tried to find out how that works). – marmot Jun 19 '18 at 15:23

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.