费曼图与 tikz - 垂直

费曼图与 tikz - 垂直

我有一张费曼图。是否可以将时间箭头(图片右侧)距离费曼图几厘米?是否可以将时间箭头变\draw[fermion]长,将上面的节点变小?

代码基于来自哈里什·库马尔

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{pgfplots}
\usepackage{xparse}
\usepackage[left=1cm,right=1cm,top=2cm,bottom=2cm]{geometry}

\usetikzlibrary{positioning,arrows,patterns}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{calc}

\tikzset{
  photon/.style={decorate, decoration={snake}, draw=black},
  fermion/.style={draw=black, postaction={decorate},decoration={markings,mark=at position .55 with {\arrow{>}}}},
}

\begin{document}
\pagestyle{empty}

\iffalse
\begin{equation*}
\left ( 2 \pi \right )^4 \int \left [ \bar{v}^{(s_2)} \left ( p _3 \right ) \left (i \sqrt{4 \pi \alpha}\gamma^\mu \right ) v^{(s_1)} \left ( p _1 \right ) \right ] \frac{i g_{\mu\nu}}{q^2} \left [ \bar{v}^{(s_4)} \left ( p _4 \right ) \left ( i \sqrt{4 \pi \alpha}\gamma^\mu \right ) v^{(s_2)} \left ( p _2 \right ) \right ] \times \delta ^{(4)} \left (p _1 - p _3 - q \right ) \delta ^{(4)} \left ( p _2 + q - p _4 \right ) d^4 q
\end{equation*}
\fi

\begin{figure}
\centering    
\begin{tikzpicture}[node distance=1cm and 1cm]
\coordinate[] (v1);
\coordinate[right=of v1] (v2);
\coordinate[right=of v2] (v3);
\coordinate[right=of v3] (v4);
\coordinate[above right=of v4,label=right:$\mu$] (f1);
\coordinate[below right=of v4,label=right:$\mu$] (f2);
\coordinate[above left =of v1,label=left :$e$] (e1);
\coordinate[below left =of v1,label=left :$e$] (e2);
%The fermion
\draw[fermion] (v1) -- (e1) node[midway, sloped, above=0.1cm] {$p_3, s_3$};
\draw[fermion] (e2) -- (v1) node[midway, sloped, below=0.1cm] {$p_1, s_1$};
\draw[fermion] (v4) -- (f1) node[midway, sloped, above=0.1cm] {$p_4, s_4$};
\draw[fermion] (f2) -- (v4) node[midway, sloped, below=0.1cm] {$p_2, s_2$};
%The proton
\draw[photon] (v1) -- (v4) node[midway,below=0.1cm] {$\gamma$} node[midway, above=0.1cm]{$q$};
%the timeline
\draw[arrows=->,line width=1.2pt] (f2) -- (f1) node[midway, sloped, above=-0.05cm, rotate=180] {time};
\end{tikzpicture}
\end{figure}

\end{document}

亲切的问候!

提前感谢您!

答案1

您必须调整尺寸

\coordinate[above right= 3cm and 3cm of v4,label=right:$\mu$] (f1);
\coordinate[below right= 3cm and 3cm of v4,label=right:$\mu$] (f2);
\coordinate[above left = 3cm and 3cm of v1,label=left :$e$] (e1);
\coordinate[below left = 3cm and 3cm of v1,label=left :$e$] (e2);

使\draw[fermion]更长。要使节点文本更小,请使用(或任意大小)。进一步font=\footnotesize移动时间箭头,请使用xshift

\draw[arrows=->,line width=1.2pt,] ([xshift=1cm]f2) -- ([xshift=1cm]f1) node[midway, sloped, above=-0.05cm, rotate=180] {time};

代码:

\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{pgfplots}
\usepackage{xparse}
\usepackage[left=1cm,right=1cm,top=2cm,bottom=2cm]{geometry}

\usetikzlibrary{positioning,arrows,patterns}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{calc}

\tikzset{
  photon/.style={decorate, decoration={snake}, draw=black},
  fermion/.style={draw=black, postaction={decorate},decoration={markings,mark=at position .55 with {\arrow{>}}}},
}

\begin{document}

\begin{figure}
\centering
\begin{equation*}
\left ( 2 \pi \right )^4 \int \left [ \bar{v}^{(s_2)} \left ( p _3 \right ) \left (i \sqrt{4 \pi \alpha}\gamma^\mu \right ) v^{(s_1)} \left ( p _1 \right ) \right ] \frac{i g_{\mu\nu}}{q^2} \left [ \bar{v}^{(s_4)} \left ( p _4 \right ) \left ( i \sqrt{4 \pi \alpha}\gamma^\mu \right ) v^{(s_2)} \left ( p _2 \right ) \right ] \times \delta ^{(4)} \left (p _1 - p _3 - q \right ) \delta ^{(4)} \left ( p _2 + q - p _4 \right ) d^4 q
\end{equation*}


\begin{tikzpicture}[node distance=1cm and 1cm]
\coordinate[] (v1);
\coordinate[right=of v1] (v2);
\coordinate[right=of v2] (v3);
\coordinate[right= of v3] (v4);
\coordinate[above right= 3cm and 3cm of v4,label=right:$\mu$] (f1);
\coordinate[below right= 3cm and 3cm of v4,label=right:$\mu$] (f2);
\coordinate[above left = 3cm and 3cm of v1,label=left :$e$] (e1);
\coordinate[below left = 3cm and 3cm of v1,label=left :$e$] (e2);
\draw[fermion] (v1) -- (e1) node[midway, sloped, above=0.1cm,font=\footnotesize] {$p_3, s_3$};
\draw[fermion] (e2) -- (v1) node[midway, sloped, below=0.1cm,font=\footnotesize] {$p_1, s_1$};
\draw[photon] (v1) -- (v4) node[midway,below=0.1cm] {$\gamma$} node[midway, above=0.1cm]{$q$};
\draw[fermion] (v4) -- (f1) node[midway, sloped, above=0.1cm,font=\footnotesize] {$p_4, s_4$};
\draw[fermion] (f2) -- (v4) node[midway, sloped, below=0.1cm,font=\footnotesize] {$p_2, s_2$};
\draw[arrows=->,line width=1.2pt,] ([xshift=1cm]f2) -- ([xshift=1cm]f1) node[midway, sloped, above=-0.05cm, rotate=180] {time};
\end{tikzpicture}
\end{figure}

\end{document}

在此处输入图片描述

相关内容