User Tools

Site Tools


latex:feynman_equation_file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
latex:feynman_equation_file [2017/12/08 14:02] iwnlatex:feynman_equation_file [2023/02/04 15:45] iwn
Line 1: Line 1:
 This file show how you can typset a text with Feynman diagrams in equations. It uses the macro from [[latex:feynman_file|this example]] to compile the diagrams without the need for extra scripts or commands. This file show how you can typset a text with Feynman diagrams in equations. It uses the macro from [[latex:feynman_file|this example]] to compile the diagrams without the need for extra scripts or commands.
  
-{{ latex:feynman_equations.png ? 2000 }}+{{ latex:feynman:feynman_equations.png ? 2000 }}
  
 <code latex feynman_equations.tex> <code latex feynman_equations.tex>
 +% !TEX program = pdflatexmk
 +% !TEX parameter = -shell-escape
 % Author: Izaak Neutelings (July 2017) % Author: Izaak Neutelings (July 2017)
- +\documentclass[a4paper,12pt]{article}
-\documentclass[10pt,a4paper]{article}+
 \usepackage[margin=2.4cm]{geometry} % margins \usepackage[margin=2.4cm]{geometry} % margins
 \usepackage{amsmath} \usepackage{amsmath}
 \usepackage{graphicx} \usepackage{graphicx}
-\usepackage{feynmp} +\usepackage{feynmp-auto}
- +
-% macro to compile Feynman graphs without extra scripts +
-\DeclareGraphicsRule{*}{mps}{*}{} +
-\makeatletter +
-\def\endfmffile{ +
-  \fmfcmd{\p@rcent\space the end.^^J end.^^J endinput;+
-  \if@fmfio +
-    \immediate\closeout\@outfmf +
-  \fi +
-  %\ifnum\pdfshellescape=\@ne +
-  \ifnum\pdfshellescape>\z@ +
-    \immediate\write18{mpost \thefmffile} +
-  \fi} +
-\makeatother+
  
 \begin{document} \begin{document}
- 
- 
  
 \section{Typesetting equations with Feynman diagrams} \section{Typesetting equations with Feynman diagrams}
Line 150: Line 135:
  
 Another tip: use \verb|\\[10pt]| instead of just \verb|\\| at the end of a line in the \verb|aligned| environment to add extra vertical white space between two lines of equations. Another tip: use \verb|\\[10pt]| instead of just \verb|\\| at the end of a line in the \verb|aligned| environment to add extra vertical white space between two lines of equations.
- 
  
 \end{document} \end{document}
 </code> </code>
latex/feynman_equation_file.txt · Last modified: 2023/02/04 15:46 by iwn