1

I have a simple question comming the following code:

\documentclass{article}
% lualatex
\usepackage{tikz-feynman}

\begin{document}
\begin{figure}[h!]
\centering

\feynmandiagram [inline=(b), horizontal=a to b] {
a --[fermion] b [dot]  -- [blue, gluon] c, 
b  -- [fermion] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [ghost] c, 
b  -- [ghost] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to d] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d,
b  -- [blue, gluon] e,
};

\end{figure}
\end{document}

The forth diagram is a litle bit bigger than the others, as can be seen here:

enter image description here

How should I proceed in order to make all the diagrams have the same size?

3
  • 2
    Yeah, the fourth diagram needs to be the same size as the others, or else you'll break gauge invariance.
    – Buzz
    Jan 5 at 0:03
  • 2
    @Buzz, as well as the Poincare invariance!
    – felix
    Jan 5 at 12:35
  • 1
    I am afraid that the only thing I was ruinning was my master thesis wonderfull look!
    – Tr909T
    Jan 5 at 12:48

2 Answers 2

2

I wouldn't use tools like \resizebox or similar to scale the diagram. This will change the line width and size of the dot and will make your thesis look like a ransom letter.

Instead you could nudge the coordinates a bit to move in the right direction:

% !TeX TS-program = lualatex

\documentclass{article}
% lualatex
\usepackage{tikz-feynman}

\begin{document}
\begin{figure}[h!]
\centering

\feynmandiagram [inline=(b), horizontal=a to b] {
a --[fermion] b [dot]  -- [blue, gluon] c, 
b  -- [fermion] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [ghost] c, 
b  -- [ghost] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to d] {
a[shift={(0.1cm,-0.1cm)}] --[blue, gluon] b [dot]  -- [blue, gluon] c[shift={(-0.2cm,0.2cm)}], 
b  -- [blue, gluon] d[shift={(-0.2cm,-0.1cm)}],
b  -- [blue, gluon] e[shift={(0.1cm,0.2cm)}],
};

\end{figure}
\end{document}

enter image description here

Alternatively use the tikz scale option, which will leave the line width, dot size etc. intact:

% !TeX TS-program = lualatex

\documentclass{article}
% lualatex
\usepackage{tikz-feynman}

\begin{document}
\begin{figure}[h!]
\centering

\feynmandiagram [inline=(b), horizontal=a to b] {
a --[fermion] b [dot]  -- [blue, gluon] c, 
b  -- [fermion] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [ghost] c, 
b  -- [ghost] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to d,scale=0.95] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d,
b  -- [blue, gluon] e,
};

\end{figure}
\end{document}

enter image description here

2
  • Thanks a lot! I noticed that problem as soon as I re-scaled the 4th diagram... This is in fact the correct way to solve issue!
    – Tr909T
    Jan 5 at 15:14
  • @Tr909T You're welcome! Jan 5 at 15:15
1

You can use scalerel package with the option \scaleobj to zoom in or out. The value is .87.

\documentclass{article}
% lualatex
\usepackage{tikz-feynman}
\usepackage{scalerel}
\begin{document}
\begin{figure}[h!]
\centering

\feynmandiagram [inline=(b), horizontal=a to b] {
a --[fermion] b [dot]  -- [blue, gluon] c, 
b  -- [fermion] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [ghost] c, 
b  -- [ghost] d
};
\qquad
\feynmandiagram [inline=(b), horizontal=a to b] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d
};
\qquad
\scaleobj{.87}{\feynmandiagram [inline=(b), horizontal=a to d] {
a --[blue, gluon] b [dot]  -- [blue, gluon] c, 
b  -- [blue, gluon] d,
b  -- [blue, gluon] e,
};}

\end{figure}
\end{document}

enter image description here

1
  • 1
    A simple solution to a simple problem! Great! Thanks!
    – Tr909T
    Jan 5 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .