```tex %!TEX program=pdflatex \documentclass[a4paper,12pt,openany]{article} \usepackage[left=1.25in,right=1.25in,top=1in,bottom=1in]{geometry} \usepackage{amsmath,array,amssymb,framed,pstricks,xcolor,xspace} \usepackage{tikz-feynman} \usepackage[framed,amsmath,thmmarks]{ntheorem} \usepackage[utf8]{inputenc} \usepackage{fontenc} \usepackage[colorlinks,linkcolor=blue]{hyperref} \DeclareFixedFont{\tnrm}{OT1}{ptm}{m}{n}{12pt} \linespread{1.25} \begin{document} \feynmandiagram [horizontal= a to b]{ i1 -- [fermion] a -- [fermion] i2, a -- [photon] b, f1 -- [fermion] b -- [fermion] f2, } \end{document} ```

2 回答2

0
我这样没问题: ```tex %!TEX program=pdflatex \documentclass[a4paper,12pt,openany]{article} \usepackage[left=1.25in,right=1.25in,top=1in,bottom=1in]{geometry} \usepackage{amsmath,array,amssymb,framed,pstricks,xcolor,xspace} \usepackage{tikz-feynman} \usepackage[framed,amsmath,thmmarks]{ntheorem} \usepackage[utf8]{inputenc} \usepackage{fontenc} \usepackage[colorlinks,linkcolor=blue]{hyperref} \DeclareFixedFont{\tnrm}{OT1}{ptm}{m}{n}{12pt} \linespread{1.25} \begin{document} \begin{tikzpicture} \feynmandiagram [horizontal= a to b]{ i1 -- [fermion] a -- [fermion] i2, a -- [photon] b, f1 -- [fermion] b -- [fermion] f2, }; \end{tikzpicture} \end{document} ```

作者追问:2019-12-11 15:03

![](https://pics.latexstudio.net/data/images/201912/e70039d4f779403.png) 但是弹出这样的情况
0
`feynmandiagram` 需要放置于 `tikzpicture` 环境中,并且记得结尾加分号

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。