Tikz-Feynman 图在子图中重叠

Tikz-Feynman 图在子图中重叠

我想并排显示三个费曼图。我使用 subfigure 环境。但是,第二张和第三张图的顶点标签重叠。我尝试使用参数[scale=0.5]缩小图表,\begin{tikzpicture}但之后没有任何效果。我该如何缩小这里的图表?

\begin{figure}[h!t]
  \centering
     \begin{subfigure}[b]{0.3\textwidth}
         \centering
         \begin{tikzpicture}
         \begin{feynman}
         \vertex (i0) {\(P,M\)};
         \vertex [right=of i0] (v0);
         \vertex [above right=of v0] (v1);
         \vertex [above right=of v1] (o0) {\(p_1,m_1\)};
         \vertex [right=of v1] (o1) {\(p_2,m_2\)};
         \vertex [below right=of v0] (o2) {\(p_3,m_3\)};
         \diagram* {
         (i0) -- [fermion] (v0) -- [fermion, edge label={\(\tilde{p},\tilde{m}\)}] (v1) -- [fermion] (o0),
         (v1) -- [dashed] (o1),
         (v0) -- [dashed] (o2),
         };
         \end{feynman}
         \end{tikzpicture}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.3\textwidth}
         \centering
         \begin{tikzpicture}
         \begin{feynman}
           \vertex (i0) {\(P,M\)};
           \vertex [right=of i0] (v0);
           \vertex [above right=of v0] (v1);
           \vertex [above right=of v1] (o0) {\(p_1,m_1\)};
           \vertex [right=of v1] (o1) {\(p_2,m_2\)};
           \vertex [below right=of v0] (o2) {\(p_3,m_3\)};
           \diagram* {
         (i0) -- [fermion] (v0) -- [fermion, edge label={\(\tilde{p},\tilde{m}\)}] (v1) -- [fermion] (o0),
         (v1) -- [dashed] (o2),
         (v0) -- [dashed] (o1),
         };
         \end{feynman}
         \end{tikzpicture}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.3\textwidth}
         \centering
         \begin{tikzpicture}
         \begin{feynman}
         \vertex (i0) {\(P,M\)};
         \vertex [right=of i0] (v0);
         \vertex [below right=of v0] (v1);
         \vertex [above right=of v0] (o0) {\(p_1,m_1\)};
         \vertex [right=of v1] (o1) {\(p_2,m_2\)};
         \vertex [below right=of v1] (o2) {\(p_3,m_3\)};
         \diagram* {
         (i0) -- [fermion] (v0) -- [fermion] (o0),
         (v0) -- [dashed, edge label={\(\tilde{p},\tilde{m}\)}] (v1) -- [dashed] (o1),
         (v1) -- [dashed] (o2),
         };
         \end{feynman}
         \end{tikzpicture}
     \end{subfigure}
\end{figure}

答案1

这些图比 更宽0.3\textwidth。一个简单的方法是使用\begin{tikzpicture}[scale=0.75,every node/.style={transform shape}]

关键transform shape是将变换(缩放)应用于每个节点。

A

\documentclass[12pt,a4paper]{article}

\usepackage{tikz}

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

\begin{document}   

\begin{figure}[h!t]
    \centering
    \begin{subfigure}[b]{0.3\textwidth}
        \centering
        \begin{tikzpicture}[scale=0.75,every node/.style={transform shape}] % changed <<<<<<<<<<<<<<<<
            \begin{feynman}
                \vertex (i0) {\(P,M\)};
                \vertex [right=of i0] (v0);
                \vertex [above right=of v0] (v1);
                \vertex [above right=of v1] (o0) {\(p_1,m_1\)};
                \vertex [right=of v1] (o1) {\(p_2,m_2\)};
                \vertex [below right=of v0] (o2) {\(p_3,m_3\)};
                \diagram* {
                    (i0) -- [fermion] (v0) -- [fermion, edge label={\(\tilde{p},\tilde{m}\)}] (v1) -- [fermion] (o0),
                    (v1) -- [dashed] (o1),
                    (v0) -- [dashed] (o2),
                };
            \end{feynman}
        \end{tikzpicture}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.3\textwidth}
        \centering
        \begin{tikzpicture}[scale=0.75,every node/.style={transform shape}]
            \begin{feynman}
                \vertex (i0) {\(P,M\)};
                \vertex [right=of i0] (v0);
                \vertex [above right=of v0] (v1);
                \vertex [above right=of v1] (o0) {\(p_1,m_1\)};
                \vertex [right=of v1] (o1) {\(p_2,m_2\)};
                \vertex [below right=of v0] (o2) {\(p_3,m_3\)};
                \diagram* {
                    (i0) -- [fermion] (v0) -- [fermion, edge label={\(\tilde{p},\tilde{m}\)}] (v1) -- [fermion] (o0),
                    (v1) -- [dashed] (o2),
                    (v0) -- [dashed] (o1),
                };
            \end{feynman}
        \end{tikzpicture}
    \end{subfigure}
    \hfill
    \begin{subfigure}[b]{0.3\textwidth}
        \centering
        \begin{tikzpicture}[scale=0.75,every node/.style={transform shape}]
            \begin{feynman}
                \vertex (i0) {\(P,M\)};
                \vertex [right=of i0] (v0);
                \vertex [below right=of v0] (v1);
                \vertex [above right=of v0] (o0) {\(p_1,m_1\)};
                \vertex [right=of v1] (o1) {\(p_2,m_2\)};
                \vertex [below right=of v1] (o2) {\(p_3,m_3\)};
                \diagram* {
                    (i0) -- [fermion] (v0) -- [fermion] (o0),
                    (v0) -- [dashed, edge label={\(\tilde{p},\tilde{m}\)}] (v1) -- [dashed] (o1),
                    (v1) -- [dashed] (o2),
                };
            \end{feynman}
        \end{tikzpicture}
    \end{subfigure}
\end{figure}

\end{document}

\scalebox也有效

\scalebox{0.75}{\begin{tikzpicture}
...
\end{tikzpicture}}

相关内容