我成功地写了这个:
\documentclass[a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{matrix,calc}
\begin{center}
\begin{tikzpicture}[node distance=1cm and 1cm]
\node at (-3.4,-1}
{$\begin{pmatrix}\mathcal{F}^{(s)}_+\left[\begin{matrix}\alpha_1,\alpha_{\i nfty}\\ \alpha_z,\alpha_0
\end{matrix}\right](z) \\
\mathcal{F}^{(s)}_-\left[\begin{matrix}\alpha_1,\alpha_{\infty}\\ \alpha_z,\alpha_0
\end{matrix}\right](z)\end{pmatrix}$};
\node at (-1.65,-1){$=$};
\coordinate[label=above:1] (e1);
\coordinate[below=of e1] (aux1);
\coordinate[left=of aux1,label=left:$\infty$] (e2);
\coordinate[right=1.7cm of aux1] (aux2);
\coordinate[above=of aux2,label=above:z] (e3);
\coordinate[right=of aux2,label=right:0] (e4);
\draw[line] (e1) -- (aux1);
\draw[line] (aux1) -- (e2);
\draw[line] (e3) -- (aux2);
\draw[line] (aux2) -- (e4);
\draw[line] (aux1) -- node[label=below:q] {} (aux2);
\end{tikzpicture}
\end{center},
这让我
但在右侧我想创建一个具有相同类型的费曼图的向量。
我真的不知道如何用费曼图创建一个向量,并将其排列在方程中。有人能帮我吗?
答案1
我不确定是否理解了您的问题,但 LaTeX 将 anytikzpicture
视为任何其他字符或框。因此,您可以轻松构建一个数组/表格/矩阵,其元素为 tikzpictures。
上图已纠正您代码中的一些错误,例如缺少\begin{document}\end{document}
或\usepackage{mathtools}
(或amsmath
)。
tikzpicture
我并没有试图在 内部建立一个等式,而是tikzpictures
在等式中包含了两个。
\documentclass[a4paper]{article}
\usepackage{mathtools}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{matrix,calc}
\begin{document}
\[
\begin{pmatrix}\mathcal{F}^{(s)}_+\left[\begin{matrix}\alpha_1,\alpha_{\infty}\\ \alpha_z,\alpha_0
\end{matrix}\right](z) \\
\mathcal{F}^{(s)}_-\left[\begin{matrix}\alpha_1,\alpha_{\infty}\\ \alpha_z,\alpha_0
\end{matrix}\right](z)\end{pmatrix} =
\begin{pmatrix}
\begin{tikzpicture}
\coordinate[label=above:1] (e1);
\coordinate[below=of e1] (aux1);
\coordinate[left=of aux1,label=left:$\infty$] (e2);
\coordinate[right=1.7cm of aux1] (aux2);
\coordinate[above=of aux2,label=above:z] (e3);
\coordinate[right=of aux2,label=right:0] (e4);
\draw[thick] (e1) -- (aux1);
\draw[thick] (aux1) -- (e2);
\draw[thick] (e3) -- (aux2);
\draw[thick] (aux2) -- (e4);
\draw[thick] (aux1) -- node[label=below:q] {} (aux2);
\end{tikzpicture}\\
\begin{tikzpicture}
\coordinate[label=above:1] (e1);
\coordinate[below=of e1] (aux1);
\coordinate[left=of aux1,label=left:$\infty$] (e2);
\coordinate[right=1.7cm of aux1] (aux2);
\coordinate[above=of aux2,label=above:z] (e3);
\coordinate[right=of aux2,label=right:0] (e4);
\draw[thick] (e1) -- (aux1);
\draw[thick] (aux1) -- (e2);
\draw[thick] (e3) -- (aux2);
\draw[thick] (aux2) -- (e4);
\draw[thick] (aux1) -- node[label=below:q] {} (aux2);
\end{tikzpicture}
\end{pmatrix}
\]
\end{document}