[Tex/LaTex] Tikz-Feynman: too big vertex label

labelstikz-feynman

If I use scalebox, the labels of the vertices are too big compared to those of the particles.

    \scalebox{2.5}{
    \feynmandiagram [horizontal=a to b] {
    i1 [node font=\tiny, particle=$e^-$] -- [fermion, arrow size=0.8pt, momentum={[arrow shorten=0.3, node font=\tiny]$k_1$}] a [label=${\mu}$]-- [fermion, arrow size=0.8pt, rmomentum={[arrow shorten=0.3, node font=\tiny]$k_2$}] i2 [node font=\tiny, particle=$e^+$],
    a -- [photon,node font=\tiny, edge label=\(\gamma\), momentum'={[arrow shorten=0.3, node font=\tiny]$q$}] b [label=$\nu$],
    f1 [node font=\tiny, particle=$\mu^+$] -- [fermion, arrow size=0.8pt, rmomentum'={[arrow shorten=0.3, node font=\tiny]$p_2$}] b -- [fermion, arrow size=0.8pt, momentum'={[arrow shorten=0.3, node font=\tiny]$p_1$}] f2 [node font=\tiny, particle=$\mu^-$],
    };
    }

How can I fix that (still using scalebox) ?

Best Answer

I'm not actually sure what you are intending to do; however, it is possible to adjust the font size within the \scalebox using the \fontsize command. For example, if you wanted to scale the diagram by 2 but keep the original font size the same, you could do:

\RequirePackage{luatex85}
\documentclass[border=10pt]{standalone}

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

\begin{document}
\scalebox{2}{
  \fontsize{0.5em}{0.5em}
  \feynmandiagram [horizontal=a to b] {
    i1 [particle=\(e^-\)]
    -- [fermion, arrow size=0.8pt, momentum={[arrow shorten=0.3]\(k_1\)}] a [label=\({\mu}\)]
    -- [fermion, arrow size=0.8pt, rmomentum={[arrow shorten=0.3]\(k_2\)}]
    i2 [particle=\(e^+\)],
    a -- [photon, edge label=\(\gamma\), momentum'={[arrow shorten=0.3]\(q\)}]
    b [label=\(\nu\)],
    f1 [particle=\(\mu^+\)]
    -- [fermion, arrow size=0.8pt, rmomentum'={[arrow shorten=0.3]\(p_2\)}] b
    -- [fermion, arrow size=0.8pt, momentum'={[arrow shorten=0.3]\(p_1\)}] f2 [particle=\(\mu^-\)],
  };
}
\end{document}

output

The \fontsize{0.5em}{0.5em} essentially halves the font size within the scalebox so that, after being scaled up by a factor of 2 it is the same as it was to begin with.

Note that I'm not sure why the font sizes of the superscripts and subscripts isn't scaled appropriately, but I'm sure another question on this site addresses this.

Related Question