1、先在网上下载一个JaxoDraw软件;
2、安装好后画出一个图(大多数费曼图都可以画);
3、然后选择"file"——>"Export"——>选择“latex”,点击“Preview”,然后用鼠标选中内容,拷贝,粘贴到winedt中,然后编译,再"dvi2ps",然后"ps2pdf",就可以看到图形了。
优点:用该软件可以用鼠标画图,方便快速,便于修改,在latex代码中细调,无需额外用 mp,mf 等编译。还有对于弦理论中的一些图形该软件也很方便的画出。
注:一定要把“axodraw.sty”放到latex的源代码的同一个文件夹中。
这里给axodraw.sty下载。
和下面的代码的latex文件放到同一个目录编译即可。(pdf文件中才能正常显示图形)
例子:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% LaTex file generated by JaxoDraw-1.3-2
%%% CreationDate: 4/5/2008
%%% Make sure you have the axodraw package installed in order to proceed!
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper]{article}
\usepackage{axodraw}
\usepackage{pstricks}
\usepackage{color}
\setlength{\oddsidemargin}{0pt} \setlength{\evensidemargin}{0pt}
\setlength{\topmargin}{0pt} \setlength{\headheight}{0pt}
\setlength{\headsep}{0pt} \setlength{\topskip}{0pt}
\setlength{\footskip}{0pt} \setlength{\textwidth}{\paperwidth}
\addtolength{\textwidth}{-2in} \setlength{\textheight}{\paperheight}
\addtolength{\textheight}{-2in} \pagestyle{empty}
\begin{document}
%%JaxoComment:
%%JaxoScale{1.0}
\begin{center}
\fcolorbox{white}{white}{
\begin{picture}(267,237) (97,-35)
\SetWidth{1.0}
\SetColor{Black}
\ArrowLine(281,125)(363,193)
\SetColor{Black}
\ArrowLine(276,27)(276,122)
\SetColor{Black}
\ArrowLine(276,26)(364,-32)
\Photon(280,124)(176,125){2.5}{4}
\SetColor{Black}
\Photon(276,25)(172,26){2.5}{4}
\ArrowLine(175,28)(175,123)
\SetColor{Black}
\ArrowLine(176,27)(103,-34)
\ArrowLine(175,125)(107,190)
\SetColor{Black}
\DashLine(163,135)(164,15){10}
\DashLine(152,146)(152,4){10}
\DashLine(291,130)(291,18){10}
\DashLine(306,143)(306,8){10}
\Text(208,7)[lb]{\Large{\Black{$\rput[lb]{5}{p-k}$}}}
\Text(220,132)[lb]{\Large{\Black{$\rput[lb]{5}{k}$}}}
\Text(114,183)[lb]{\Large{\Black{$\rput[lb]{5}{P/2}$}}}
\Text(324,169)[lb]{\Large{\Black{$\rput[lb]{5}{P/2}$}}}
\Text(326,-35)[lb]{\Large{\Black{$\rput[lb]{5}{-P/2}$}}}
\Text(99,-32)[lb]{\Large{\Black{$\rput[lb]{5}{-P/2}$}}}
\end{picture}
}
\end{center}
\end{document}
没有评论:
发表评论