如何绘制自由场理论的环路图(物理学)

如何绘制自由场理论的环路图(物理学)

回路图

我必须画出图中所示的图形。这些是方程内的循环图。

答案1

以下是自由场理论的图表集合,以phinman.sty(代码在本答案末尾) 的形式提供。由于间距原因,每个命令有两个版本,一个带有标签,一个不带有标签。

在此处输入图片描述

上面演示的代码:

\documentclass{article}
\usepackage{phinman} % pronounce like Feynman
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\begin{center}
\begin{tabular}{lc@{\quad}lc}
\verb"\PM{-}"    & \PM{-}    & \verb"\PMl{-}{x}{y}"          & \PMl{-}{x}{y}          \\
\verb"\PM{x}"    & \PM{x}    & \verb"\PMl{x}{x}"             & \PMl{x}{x}             \\
\verb"\PM{||}"   & \PM{||}   & \verb"\PMl{||}{u}{v}{x}{y}"   & \PMl{||}{u}{v}{x}{y}   \\
\verb"\PM{=}"    & \PM{=}    & \verb"\PMl{=}{u}{v}{x}{y}"    & \PMl{=}{u}{v}{x}{y}    \\
\verb"\PM{X}"    & \PM{X}    & \verb"\PMl{X}{u}{v}{x}{y}"    & \PMl{X}{u}{v}{x}{y}    \\
\verb"\PM{--}"   & \PM{--}   & \verb"\PMl{--}{x}{y}"         & \PMl{--}{x}{y}         \\
\verb"\PM{-o-}"  & \PM{-o-}  & \verb"\PMl{-o-}{x}{y}{z}"     & \PMl{-o-}{x}{y}{z}     \\
\verb"\PM{8}"    & \PM{8}    & \verb"\PMl{8}{x}"             & \PMl{8}{x}             \\
\verb"\PM{88}"   & \PM{88}   & \verb"\PMl{88}{x}{y}"         & \PMl{88}{x}{y}         \\
\verb"\PM{ooo}"  & \PM{ooo}  & \verb"\PMl{ooo}{x}{y}"        & \PMl{ooo}{x}{y}        \\
\verb"\PM{-8-}"  & \PM{-8-}  & \verb"\PMl{-8-}{x}{y}{z}"     & \PMl{-8-}{x}{y}{z}     \\
\verb"\PM{-88-}" & \PM{-88-} & \verb"\PMl{-88-}{x}{u}{v}{y}" & \PMl{-88-}{x}{u}{v}{y} \\
\verb"\PM{-ooo-}"& \PM{-ooo-}& \verb"\PMl{-ooo-}{x}{u}{v}{y}"& \PMl{-ooo-}{x}{u}{v}{y}\\
\verb"\PM{-o8-}" & \PM{-o8-} & \verb"\PMl{-o8-}{x}{u}{v}{y}" & \PMl{-o8-}{x}{u}{v}{y}
\end{tabular}
\end{center}
\clearpage
\lipsum[1]
\begin{align*}
  \PMl{-}{x}{y}         & = i\Delta(x,y)\\
  \PMl{x}{y}            & = -i\lambda\\
  \langle\phi(x_1)\phi(x_2)\phi(x_3)\phi(x_4)\rangle_0
                        &= \PMl{||}{x_1}{x_2}{x_3}{x_4} + \PMl{=}{x_1}{x_2}{x_3}{x_4}
                           + \PMl{X}{x_1}{x_2}{x_3}{x_4}\\
  \PMl{-o-}{x_1}{x_2}{y}&=\frac{-i\lambda}2\int\cdots\\
  \PMl{-8-}{x_1}{y}{x_2}&=\frac{-i\lambda}6i\Delta(x_1,x_2)\int\cdots\\
  \PMl{8}{y}            &=\frac{-i\lambda}6\int\cdots\\
  \text{denominator}    &=1+\PM{8}+\PM{88}+\PM{ooo}+\cdots\\
  \text{numerator}      &=\PM{--}+\PM{-8-}+\PM{-88-}+\PM{-ooo-}+\cdots\\
                        &\quad+\PM{-o-}+\PM{-o8-}+\cdots
\end{align*}
\lipsum[2]
\end{document}

该包的代码phinman.sty(发音类似 Feynman):

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{phinman}[2017/04/14 Diagrams for the free field theory]
\RequirePackage{tikz}
\newcommand\PMset{\pgfqkeys{/PM}}
\newcommand\PMldef[1]{\expandafter\def\csname PMl:#1\endcsname}
\newcommand\PMl[1]{\csname PMl:#1\endcsname}
\newcommand\PMdef[1]{\expandafter\def\csname PM:#1\endcsname}
\newcommand\PM[1]{\csname PM:#1\endcsname}
\newlength\PMu
\PMu=2ex

\PMset
  {dot/.style={circle,fill,draw,inner sep=0pt,outer sep=0pt,minimum size=2.5pt},
   line/.style={line width=0.6pt},
   ghostline/.style={line width=2pt,color=white}
  }

\newcommand\PMdot{node[/PM/dot]{}}
\newcommand\PMdotx[1]{node[/PM/dot,label={#1}]{}}
\newcommand\PMdota[1]{\PMdotx{[yshift=-0.5ex]above:{$#1$}}}
\newcommand\PMdotb[1]{\PMdotx{[yshift=0.5ex]below:{$#1$}}}
\newcommand\PMdotl[1]{\PMdotx{[xshift=0.5ex]left:{$#1$}}}
\newcommand\PMdotr[1]{\PMdotx{[xshift=-0.5ex]right:{$#1$}}}

\PMdef{-}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot -- (2\PMu,0)\PMdot;%
  }

\PMldef{-}#1#2%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotb{#1} -- (2\PMu,0)\PMdotb{#2};%
  }

\PMdef{--}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot -- (4\PMu,0)\PMdot;%
  }

\PMldef{--}#1#2%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotb{#1} -- (4\PMu,0)\PMdotb{#2};%
  }

\PMdef{x}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot
   (\PMu,\PMu) -- (-\PMu,-\PMu)
   (\PMu,-\PMu) -- (-\PMu,\PMu);%
  }

\PMldef{x}#1%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotx{below:{$#1$}}
   (\PMu,\PMu) -- (-\PMu,-\PMu)
   (\PMu,-\PMu) -- (-\PMu,\PMu);%
  }

\PMdef{||}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,\PMu) \PMdot -- (0,-\PMu) \PMdot
   (2\PMu,\PMu) \PMdot -- (2\PMu,-\PMu)\PMdot;%
  }

\PMldef{||}#1#2#3#4%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,\PMu) \PMdotl{#3} -- (0,-\PMu) \PMdotl{#4}
   (2\PMu,\PMu) \PMdotr{#1} -- (2\PMu,-\PMu)\PMdotr{#2};%
  }

\PMdef{=}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,\PMu) \PMdot -- (2\PMu,\PMu) \PMdot
   (0,-\PMu) \PMdot -- (2\PMu,-\PMu)\PMdot;%
  }

\PMldef{=}#1#2#3#4%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,\PMu) \PMdotl{#3} -- (2\PMu,\PMu) \PMdotr{#1}
   (0,-\PMu) \PMdotl{#4} -- (2\PMu,-\PMu)\PMdotr{#2};%
  }

\PMdef{X}%
  {\tikz[baseline={(0,-0.5ex)}]%
    {\draw[/PM/line] (0,\PMu) \PMdot -- (2\PMu,-\PMu)\PMdot;
     \draw[/PM/ghostline] (0,-\PMu)-- (2\PMu,\PMu);
     \draw[/PM/line](0,-\PMu)\PMdot -- (2\PMu,\PMu) \PMdot;
    }%
  }

\PMldef{X}#1#2#3#4%
  {\tikz[baseline={(0,-0.5ex)}]%
    {\draw[/PM/line] (0,\PMu) \PMdotl{#3} -- (2\PMu,-\PMu)\PMdotr{#2};
     \draw[/PM/ghostline] (0,-\PMu)-- (2\PMu,\PMu);
     \draw[/PM/line](0,-\PMu)\PMdotl{#4}-- (2\PMu,\PMu) \PMdotr{#1};
    }%
  }

\PMdef{-o-}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot -- ++(2\PMu,0)\PMdot
   arc(-90:270:0.6\PMu) -- ++(2\PMu,0)\PMdot;%
  }

\PMldef{-o-}#1#2#3%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotb{#1} -- ++(2\PMu,0)\PMdotb{#2}
   arc(-90:270:0.6\PMu) -- ++(2\PMu,0)\PMdotb{#3};%
  }

\PMdef{-8-}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot -- ++(4\PMu,0)\PMdot
   (2\PMu,0.8\PMu)\PMdot arc (0:360:0.6\PMu)
   arc (180:540:0.6\PMu);%
  }

\PMldef{-8-}#1#2#3%
  {\tikz[baseline={(0,0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotb{#1} -- ++(4\PMu,0)\PMdotb{#3}
   (2\PMu,0.8\PMu)\PMdotx{above:{$#2$}} arc (0:360:0.6\PMu)
   arc (180:540:0.6\PMu);%
  }


\PMdef{-ooo-}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot -- ++(4\PMu,0)\PMdot
   (1.3\PMu,0.8\PMu)\PMdot arc (0:360:0.6\PMu)
   arc (180:360:0.6\PMu) \PMdot
   arc (180:540:0.6\PMu) arc (0:180:0.6\PMu);%
  }

\PMldef{-ooo-}#1#2#3#4%
  {\tikz[baseline={(0,0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotb{#1} -- ++(4\PMu,0)\PMdotb{#4}
   (1.3\PMu,0.8\PMu)\PMdotx{above:{$#2$}} arc (0:360:0.6\PMu)
   arc (180:360:0.6\PMu) \PMdotx{above:{$#3$}}
   arc (180:540:0.6\PMu) arc (0:180:0.6\PMu);%
  }

\PMdef{8}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot arc (0:360:0.6\PMu)
   arc (180:540:0.6\PMu);%
  }

\PMldef{8}#1%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotx{below:{$#1$}} arc (0:360:0.6\PMu)
   arc (180:540:0.6\PMu);%
  }

\PMdef{88}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,-0.7\PMu) \PMdot arc (0:360:0.6\PMu) arc (180:540:0.6\PMu)
   (0,0.7\PMu) \PMdot arc (0:360:0.6\PMu) arc (180:540:0.6\PMu);%
  }

\PMldef{88}#1#2%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,-0.7\PMu) \PMdotx{below:{$#2$}} arc (0:360:0.6\PMu) arc (180:540:0.6\PMu)
   (0,0.7\PMu) \PMdotx{above:{$#1$}} arc (0:360:0.6\PMu) arc (180:540:0.6\PMu);%
  }

\PMdef{ooo}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdot arc (0:360:0.6\PMu)
   arc (180:360:0.6\PMu) \PMdot
   arc (180:540:0.6\PMu) arc (0:180:0.6\PMu);%
  }

\PMldef{ooo}#1#2%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,0) \PMdotx{below:{$#1$}} arc (0:360:0.6\PMu)
   arc (180:360:0.6\PMu) \PMdotx{below:{$#2$}}
   arc (180:540:0.6\PMu) arc (0:180:0.6\PMu);%
  }

\PMdef{-88-}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,-0.8\PMu) \PMdot arc (0:360:0.6\PMu) arc (180:540:0.6\PMu)
   (-2\PMu,0) \PMdot -- (2\PMu,0)\PMdot
   (0,0.8\PMu) \PMdot arc (0:360:0.6\PMu) arc (180:540:0.6\PMu);%
  }

\PMldef{-88-}#1#2#3#4%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,-0.8\PMu) \PMdotx{below:{$#3$}} arc (0:360:0.6\PMu) arc (180:540:0.6\PMu)
   (-2\PMu,0) \PMdotb{#1} -- (2\PMu,0)\PMdotb{#4}
   (0,0.8\PMu) \PMdotx{above:{$#2$}} arc (0:360:0.6\PMu) arc (180:540:0.6\PMu);%
  }


\PMdef{-o8-}%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,-0.8\PMu) \PMdot arc (0:360:0.6\PMu) arc (180:540:0.6\PMu)
   (-2\PMu,0) \PMdot -- (0,0) \PMdot
   arc (-90:270:0.6\PMu) -- (2\PMu,0)\PMdot;%
  }

\PMldef{-o8-}#1#2#3#4%
  {\tikz[baseline={(0,-0.5ex)}]\draw[/PM/line]
   (0,-1.5\PMu) \PMdotx{below:{$#3$}} arc (0:360:0.6\PMu) arc (180:540:0.6\PMu)
   (-2\PMu,0) \PMdotb{#1} -- (0,0) \PMdotb{#2}
   arc (-90:270:0.6\PMu) -- (2\PMu,0)\PMdotb{#4};%
  }


\endinput

答案2

你可以用 Tikz 画出来。下面我为你画的符号做了几个命令(你可能能为它们找到更好的名字)。我不得不手动调整高度2pt以使线条与+符号对齐。slipsum只是为了查看垂直间距。你可以调整线条的长度和圆圈的大小。

\documentclass{article}
\usepackage{amsmath}
\usepackage{lipsum}
\usepackage{tikz}
\usetikzlibrary{calc,arrows}
\newcommand\SajadLineLength{15mm}
\newcommand\SajadCircleRadii{3mm}
\newcommand\SajadLine[2]{\tikz[baseline=-2pt]{%
    \draw[*-*](0,0) -- (\SajadLineLength,0)node[pos=0,below]{$#1$}node[pos=1,below]{$#2$};
  }}
\newcommand\SajadLineCircleMid[2]{\tikz[baseline=-2pt]{%
    \draw[*-*](0,0) -- (\SajadLineLength,0)node[pos=0,below]{$#1$}node[pos=1,below]{$#2$};
    \draw (0.5*\SajadLineLength,0) circle (\SajadCircleRadii);
  }}
\newcommand\SajadLineCircle[2]{\tikz[baseline=-2pt]{%
    \draw[*-*](0,0) -- (\SajadLineLength,0)node[pos=0,below]{$#1$}node[pos=1,below]{$#2$};
    \draw (0.5*\SajadLineLength,\SajadCircleRadii) circle (\SajadCircleRadii);
  }}
\newcommand\SajadLineDoubleCircle[2]{\tikz[baseline=-2pt]{%
    \draw[*-*](0,0) -- (\SajadLineLength,0)node[pos=0,below]{$#1$}node[pos=1,below]{$#2$};
    \draw (0.5*\SajadLineLength,\SajadCircleRadii) circle (\SajadCircleRadii);
    \draw (0.5*\SajadLineLength,3*\SajadCircleRadii) circle (\SajadCircleRadii);
  }}

\begin{document}
\lipsum[1]
\begin{displaymath}
  A=
  \SajadLine{x_1}{x_2} 
  +\SajadLineCircle{x_1}{x_2}
  +\SajadLineCircleMid{x_1}{x_2}
  +\SajadLineDoubleCircle{x_1}{x_2}
\end{displaymath}
\lipsum[2]
\end{document}

在此处输入图片描述

相关内容