Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal vertex label #31

Closed
pseth opened this issue Aug 10, 2016 · 2 comments
Closed

Internal vertex label #31

pseth opened this issue Aug 10, 2016 · 2 comments
Labels

Comments

@pseth
Copy link

pseth commented Aug 10, 2016

Hello,

Thanks for the package, it is great!
I am trying to create a very simple bubble diagram where I wish to give the (internal) vertices labels that appear below a dot. However, I can't seem to get this to work. I can get either the dot, or the label name in place of the dot (which, as you point out in the notes, breaks the lines).

I have tried both of the following thinking this API seemed reasonable:

\feynmandiagram [layered layout, horizontal=a to b] {
    a [particle={$t_1$},dot] -- [fermion, half left] b [dot]
    -- [fermion, half left] a,
};  

\begin{tikzpicture}
  \begin{feynman}
    \vertex[dot] (a) {$t_1$};
    \vertex[right= of a, dot] (b) {$t_2$};
    \diagram* {
        (a) -- [fermion, half left] (b),
        (b) -- [fermion, half left] (a),
    };
  \end{feynman}
\end{tikzpicture}

However, neither works. In the second example, the dot simply becomes bigger. Is there a way to do this?

Thanks!

@JP-Ellis
Copy link
Owner

Hi,

I'm glad you're finding Ti_k_Z-Feynman useful!

As you have noticed, the particle and dot style are mutually exclusive because they modify the shape of the vertex itself. If you want an annotated dot, you can use the label directive:

\documentclass[tikz, border=5pt]{standalone}

\usepackage[compat=1.1.0]{tikz-feynman}

\begin{document}
\feynmandiagram [layered layout, horizontal=a to b] {
  a [dot, label=180:\(t_{1}\)]
  -- [fermion, half left] b [dot, label=0:\(t_{2}\)]
  -- [fermion, half left] a,
};  

\begin{tikzpicture}
  \begin{feynman}
    \vertex[dot, label=180:\(t_{1}\)] (a) {};
    \vertex[right=of a, dot, label=0:\(t_{2}\)] (b) {};
    \diagram* {
        (a) -- [fermion, half left] (b),
        (b) -- [fermion, half left] (a),
    };
  \end{feynman}
\end{tikzpicture}
\end{document}

pseth-1

I hope that helps!

@pseth
Copy link
Author

pseth commented Aug 11, 2016

Brilliant, thanks!

@pseth pseth closed this as completed Aug 11, 2016
Repository owner deleted a comment from g0chan Apr 1, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants