考虑下面这段代码,它使用tikz-feynman包裹:
\usepackage{tikz-feynman, contour}
\tikzfeynmanset{compat=1.1.0}
\begin{document}
\begin{center}
\begin{tikzpicture}[baseline={(current bounding box.center)}]
\begin{feynman}
\diagram [vertical'=a to b] {
{ [edges={draw=none}]
a -- b [label=0:\(\mu_{3}\)]
-- c [label=-180:\(\mu_{4}\)]
-- d [label=-180:\(\mu_{1}\)]
-- a [label=0:\(\mu_{2}\)],
},
{ [edges={photon}]
a -- ap [particle=\(p_{2}\)],
b -- bp [particle=\(p_{3}\)],
d -- dp [particle=\(p_{1}\)],
c -- cp [particle=\(p_{4}\)],
},
};
\diagram* {
(c) -- [fermion] (b)
-- [fermion] (d)
-- [fermion] (a)
-- (c),
};
\end{feynman}
\end{tikzpicture}
%
\feynmandiagram[baseline={(current bounding box.center)}, vertical'=a to b,] {
{ [edges={fermion}]
a -- b [label=0:\(\mu_{3}\)]
-- c [label=-180:\(\mu_{4}\)]
-- d [label=-180:\(\mu_{1}\)]
-- a [label=0:\(\mu_{2}\)],
},
{ [edges={photon}]
a -- ap [particle=\(p_{2}\)],
b -- bp [particle=\(p_{3}\)],
d -- dp [particle=\(p_{1}\)],
c -- cp [particle=\(p_{4}\)],
},
};
%
\begin{tikzpicture}[baseline={(current bounding box.center)}]
\begin{feynman}
\diagram [vertical'=a to b] {
{ [edges={draw=none}]
a -- b [label=0:\(\mu_{3}\)]
-- c [label=-180:\(\mu_{4}\)]
-- d [label=-180:\(\mu_{1}\)]
-- a [label=0:\(\mu_{2}\)],
},
{ [edges={photon}]
a -- ap [particle=\(p_{2}\)],
b -- bp [particle=\(p_{3}\)],
d -- dp [particle=\(p_{1}\)],
c -- cp [particle=\(p_{4}\)],
},
};
\diagram* {
(a) -- [anti fermion] (b)
-- [anti fermion] (d)
-- [anti fermion] (c)
-- (a),
};
\end{feynman}
\end{tikzpicture}
\end{center}
\end{document}
这段代码绘制了下图:
我想给每幅图贴上标签。我不需要标题,只需要在每幅图下贴上标签。标签上应该写着“图 I”、“图 II”、“图 III”。
我该如何在我的代码中实现它?
答案1
我没有得到预期的图表,但这对我的答案并不重要:使用 tabular
。
\documentclass{article}
\usepackage{tikz-feynman, contour}
\tikzfeynmanset{compat=1.1.0}
\begin{document}
\begin{center}
\begin{tabular}{ccc}
\begin{tikzpicture}[baseline={(current bounding box.center)}]
\begin{feynman}
\diagram [vertical'=a to b] {
{ [edges={draw=none}]
a -- b [label=0:\(\mu_{3}\)]
-- c [label=-180:\(\mu_{4}\)]
-- d [label=-180:\(\mu_{1}\)]
-- a [label=0:\(\mu_{2}\)],
},
{ [edges={photon}]
a -- ap [particle=\(p_{2}\)],
b -- bp [particle=\(p_{3}\)],
d -- dp [particle=\(p_{1}\)],
c -- cp [particle=\(p_{4}\)],
},
};
\diagram* {
(c) -- [fermion] (b)
-- [fermion] (d)
-- [fermion] (a)
-- (c),
};
\end{feynman}
\end{tikzpicture}
&
\feynmandiagram[baseline={(current bounding box.center)}, vertical'=a to b,] {
{ [edges={fermion}]
a -- b [label=0:\(\mu_{3}\)]
-- c [label=-180:\(\mu_{4}\)]
-- d [label=-180:\(\mu_{1}\)]
-- a [label=0:\(\mu_{2}\)],
},
{ [edges={photon}]
a -- ap [particle=\(p_{2}\)],
b -- bp [particle=\(p_{3}\)],
d -- dp [particle=\(p_{1}\)],
c -- cp [particle=\(p_{4}\)],
},
};
&
\begin{tikzpicture}[baseline={(current bounding box.center)}]
\begin{feynman}
\diagram [vertical'=a to b] {
{ [edges={draw=none}]
a -- b [label=0:\(\mu_{3}\)]
-- c [label=-180:\(\mu_{4}\)]
-- d [label=-180:\(\mu_{1}\)]
-- a [label=0:\(\mu_{2}\)],
},
{ [edges={photon}]
a -- ap [particle=\(p_{2}\)],
b -- bp [particle=\(p_{3}\)],
d -- dp [particle=\(p_{1}\)],
c -- cp [particle=\(p_{4}\)],
},
};
\diagram* {
(a) -- [anti fermion] (b)
-- [anti fermion] (d)
-- [anti fermion] (c)
-- (a),
};
\end{feynman}
\end{tikzpicture}\\
Diagram I & Diagram II & Diagram III
\end{tabular}
\end{center}
\end{document}