3

It is handy to have the automated vertex placement at \feynmandiagram from the tikz-feynman package.

Is it possible to retrieve vertex coordinates from the \feynmandiagram block? In the following example

\RequirePackage{luatex85}
\documentclass{article}
\thispagestyle{empty}
\usepackage{tikz}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}
  \feynmandiagram[horizontal=v0 to v1]{
    v0 -- [boson] v1,
    v20 -- [fermion] v1,
    v1 -- [fermion] v21,
  };
  draw[->] (v20) -- (v21);
\end{tikzpicture}
\end{document}

I would like to do an additional operation using the vertex coordinates:

  draw[->] (v20) -- (v21);

Suggestions?

2

The coordinates are accessible in the environment form:

\RequirePackage{luatex85}
\documentclass{article}
\thispagestyle{empty}
\usepackage{tikz}
\usepackage[compat=1.1.0]{tikz-feynman}
\begin{document}
\begin{tikzpicture}
  \begin{feynman}[horizontal=v0 to v1]
    \diagram {
      v0 -- [boson] v1,
      v20 -- [fermion] v1,
      v1 -- [fermion] v21,
    };
    \draw[red, ->] (v20) -- (v21);
  \end{feynman}
\end{tikzpicture}
\end{document}

Result

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.