- Creating a document in ShareLaTeX
- Uploading a project
- Copying a project
- Creating a project from a template
- Including images in ShareLaTeX
- Exporting your work from ShareLaTeX
- Using bibliographies in ShareLaTeX
- Sharing your work with others
- Debugging Compilation timeout errors

- Creating your first LaTeX document
- Choosing a LaTeX Compiler
- Paragraphs and new lines
- Bold, italics and underlining
- Lists

- Mathematical expressions
- Subscripts and superscripts
- Brackets and Parentheses
- Fractions and Binomials
- Aligning Equations
- Operators
- Spacing in math mode
- Integrals, sums and limits
- Display style in math mode
- List of Greek letters and math symbols
- Mathematical fonts

- Inserting Images
- Tables
- Positioning Images and Tables
- Lists of Tables and Figures
- Drawing Diagrams Directly in LaTeX
- TikZ package

- Bibliography management in LaTeX
- Bibliography management with biblatex
- Biblatex bibliography styles
- Biblatex citation styles
- Bibliography management with natbib
- Natbib bibliography styles
- Natbib citation styles
- Bibliography management with bibtex
- Bibtex bibliography styles

- International language support
- Quotations and quotation marks
- Arabic
- Chinese
- French
- German
- Greek
- Italian
- Japanese
- Korean
- Portuguese
- Russian
- Spanish

- Sections and chapters
- Table of contents
- Cross referencing sections and equations
- Indices
- Glossaries
- Management in a large project
- Multi-file LaTeX projects
- Hyperlinks

- Lengths in L a T e X
- Headers and footers
- Page numbering
- Paragraph formatting
- Line breaks and blank spaces
- Text alignment
- Page size and margins
- Single sided and double sided documents
- Multiple columns
- Counters
- Code listing
- Code Highlighting with minted
- Using colours in LaTeX
- Footnotes
- Margin notes

- Theorems and proofs
- Chemistry formulae
- Feynman diagrams
- Molecular orbital diagrams
- Chess notation
- Knitting patterns
- CircuiTikz package
- Pgfplots package
- Typing exams in LaTeX
- Knitr
- Attribute Value Matrices

The
*
feynmf
*
package lets you easily draw Feynman diagrams in your LaTeX documents. All you need to do is specify the vertices, the particles and the labels, and it will automatically layout and draw your diagram for you.

## Contents |

Let's start with a quick example:

*
*
Open this example in ShareLaTeX

The
*
fmffile*
*
environment must be put around all of your Feynman diagrams. You can use
*
fmffile
*
environment for multiple diagrams, so you can put one around your whole document and forget about it. The second argument to the
*
fmffile
*
environment tells LaTeX where to write the files that it uses to store the diagram. You can name this whatever you want, but you need to run metafont on your diagram between LaTeX runs in order for your diagram to show up (ShareLaTeX does this automatically):

pdflatex feynmf.tex mf '\mode:=laserjet; input diagram' pdflatex feynmf.tex

The 'fmfgraph' environment starts a Feynman diagram, and the figures in brackets afterwards specify the width and height of the diagram.

The first thing you need to do is specify your external vertices, and where they should be positioned. You can name your vertices anything you like, and say where they should be positioned with the commands
*
\fmfleft
*
,
*
\fmfright
*
,
*
\fmftop
*
,
*
\fmfbottom
*
. For example

You can connect up vertices with the
*
\fmf
*
, which will create new vertices if you pass in names that haven't been created yet. For example

A vertex can be labelled using the
*
\fmflabel
*
command, which takes two arguments: the label to apply to the vertex, and the name of the vertex to apply it to. For example, in the above diagram, if we add in the following labels, we get the updated diagram below:

*
*
Open this example in ShareLaTeX

Note that math mode can used inside the vertex labels, as we have done above.

We've seen the 'photon' and 'fermion' line styles above, but the
*
feynmf
*
package support many more.

For more information see: