<TeXmacs|1.0.7.11>

<style|tmdoc>

<\body>
  <tmdoc-title|Example <name|Feynmf> sessions>

  You may insert a <name|Feynmf> session using <menu|Insert|Session|Feynmf>.
  When you finished typing your input, press <shortcut|(kbd-return)> in order
  to compute the output. Multiline input is entered using
  <shortcut|(kbd-shift-return)>. More features are described in the chapter
  ``<hlink|<TeXmacs> as an interface|$TEXMACS_DOC_PATH/main/interface/man-itf.en.tm>''.

  If something goes wrong, the <LaTeX> compilation will stay [busy] in the
  menubar below. Just press the ``stop'' button to interrupt exectution. In
  case it doesn't help, press the ``scissors'' button to kill the feynmf
  session [dead], just start a new one, and continue.

  Below are some simple examples of sessions. Read the <name|Feynmf> manual
  for more information.

  <subsection*|Simple diagrams>

  <\session|feynmf|default>
    <\unfolded-io|feynmf] >
      (1,1)

      \\fmfstraight

      \\fmftop{f2,f1}

      \\fmf{fermion}{f1,f2}

      \\fmf{plain,right=0.9}{f1,f2}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 67006 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (1,1)

      \\fmfstraight

      \\fmftop{f2,f1}

      \\fmf{fermion}{f1,f2}

      \\fmf{boson,right=0.9}{f1,f2}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 71000 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (1,1)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmf{fermion}{f1,f4}\ 

      \\fmf{plain,right=0.5}{f1,f4}

      \\fmf{plain,right=0.5}{f2,f3}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 42912 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (1,1)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmf{fermion}{f1,f4}\ 

      \\fmf{plain,right=0.5}{f1,f3}

      \\fmf{plain,right=0.5}{f2,f4}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 33422 characters]>|ps>||||>
    </unfolded-io>

    <\input|feynmf] >
      \;
    </input>
  </session>

  <subsection*|Keldysh diagrams>

  <\session|feynmf|default>
    <\unfolded-io|feynmf] >
      (2,1)

      \\fmfstraight

      \\fmftop{f2,f1}

      \\fmfbottom{b2,b1}

      \\fmf{fermion}{f1,f2}

      \\fmf{fermion}{b2,b1}

      \\fmf{plain_arrow,right=0.4}{f2,f1}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 260452 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (2,1)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmfbottom{b4,b3,b2,b1}

      \\fmf{fermion}{f1,f4}

      \\fmf{fermion}{b4,b1}

      \\fmf{plain_arrow,right=0.0}{b3,f1}

      \\fmf{plain_arrow,right=0.0}{b2,f4}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 260452 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (2,1)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmfbottom{b4,b3,b2,b1}

      \\fmf{fermion}{f1,f4}

      \\fmf{fermion}{b4,b1}

      \\fmf{plain_arrow,right=0.5}{f3,f1}

      \\fmf{plain_arrow,right=0.0}{b2,f4}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 260452 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (2,1)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmfbottom{b4,b3,b2,b1}

      \\fmf{fermion}{f1,f4}

      \\fmf{fermion}{b4,b1}

      \\fmf{plain_arrow,right=0.5}{f3,f1}

      \\fmf{boson,right=0.0}{b2,f4}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 260452 characters]>|ps>||||>
    </unfolded-io>

    <\input|feynmf] >
      \;
    </input>
  </session>

  <subsection*|Renormalization group diagrams with crossed or slashed lines>

  <\session|feynmf|default>
    <\unfolded-io|feynmf] >
      (2,2)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmf{fermion}{f1,f4}\ 

      \\fmf{crossed,right=0.5}{f1,f4}

      \\fmf{plain,right=0.5}{f2,f3}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 155822 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (2,2)

      \\fmfstraight

      \\fmftop{f4,f3,f2,f1}

      \\fmf{fermion}{f1,f4}\ 

      \\fmf{slashed,right=0.5}{f1,f4}

      \\fmf{plain,right=0.5}{f2,f3}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 155822 characters]>|ps>||||>
    </unfolded-io>

    <\input|feynmf] >
      \;
    </input>
  </session>

  <subsection*|Fancy examples with labels>

  You can add new linestyles to the file feynmf-styles in the plugin root.

  <\session|feynmf|default>
    <\unfolded-io>
      feynmf]\ 
    <|unfolded-io>
      (2,1)

      \\fmfstraight

      \\fmftop{f2,f1}

      \\fmfbottom{b2,b1}

      \\fmfv{label=$0_{a'}$}{f1} \\fmfv{label=$0_{a }$}{f2}

      \\fmfv{label=$0_{b }$}{b1} \\fmfv{label=$0_{b }$}{b2}

      \\fmf{fermion,label.side=right,label=$1_{a''}$}{f1,f2}

      \\fmf{fermion \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }{b2,b1}

      \\fmf{dashes_arrow,right=0.5,label=$\\omega$}{f2,f1}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 290848 characters]>|ps>||||>
    </unfolded-io>

    <\unfolded-io|feynmf] >
      (1.5,1)

      \\fmfstraight\ 

      \\fmftop{f2,f1}

      \\fmfbottom{b2,b1}

      \\fmfv{label=$0_{a'}$}{f1} \\fmfv{label=$0_{a }$}{f2}

      \\fmfv{label=$0_{b }$}{b1} \\fmfv{label=$0_{b }$}{b2}

      \\fmf{fermion,label.side=right,label=$1_{a''}$}{f1,f2}

      \\fmf{fermion \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }{b2,b1}

      \\fmf{dashes_arrow,right=0.5,label=$\\omega$}{f2,f1}

      \\fmf{plain,right=0.7}{f2,b2}
    <|unfolded-io>
      <image|<tuple|<#[encoded data, 271862 characters]>|ps>||||>
    </unfolded-io>

    <\input|feynmf] >
      \;
    </input>
  </session>

  <tmdoc-copyright|2011|Maarten Wegewijs|Joris van der Hoeven>

  <tmdoc-license|Permission is granted to copy, distribute and/or modify this
  document under the terms of the GNU Free Documentation License, Version 1.1
  or any later version published by the Free Software Foundation; with no
  Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  Texts. A copy of the license is included in the section entitled "GNU Free
  Documentation License".>
</body>

<\initial>
  <\collection>
    <associate|par-hyphen|normal>
    <associate|preamble|false>
  </collection>
</initial>