summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/feynmp-auto
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-12 22:34:51 +0000
committerKarl Berry <karl@freefriends.org>2013-03-12 22:34:51 +0000
commitfbaccd6f649a0e767f3706e926d0cc43d32785a4 (patch)
tree31fa09efc42619ecd05db9bbff6b5e58db420761 /Master/texmf-dist/tex/latex/feynmp-auto
parent3a6402a1f1023de22b00d622bdbd01d88fb994be (diff)
feynmp-auto (12mar13)
git-svn-id: svn://tug.org/texlive/trunk@29358 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/feynmp-auto')
-rw-r--r--Master/texmf-dist/tex/latex/feynmp-auto/feynmp-auto.sty112
1 files changed, 112 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/feynmp-auto/feynmp-auto.sty b/Master/texmf-dist/tex/latex/feynmp-auto/feynmp-auto.sty
new file mode 100644
index 00000000000..0b051541dd1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/feynmp-auto/feynmp-auto.sty
@@ -0,0 +1,112 @@
+%%
+%% This is file `feynmp-auto.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% feynmp-auto.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2013 by Enrico Gregorio
+%% <Enrico dot Gregorio at univr dot it>
+%% -------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any
+%% later version. The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions
+%% of LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Enrico Gregorio.
+%%
+%% This work consists of the files
+%% feynmp-auto.dtx
+%% feynmp-auto.ins
+%% and the derived file feynmp-auto.sty.
+%%
+\NeedsTeXFormat{LaTeX2e}[2008/04/05]
+\ProvidesPackage{feynmp-auto}
+ [2013/03/12 v1.0 Automatic processing of feynmp graphics]
+\@ifundefined{eTeXversion}
+ {\PackageError{feynmp-auto}{LaTeX engine too old, aborting}
+ {Please upgrade your TeX system}\@@end}{}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{feynmp}}
+\ProcessOptions\relax
+\RequirePackage{feynmp}
+\RequirePackage{ifpdf,ifxetex}
+\RequirePackage{pdftexcmds}
+\ifnum\pdf@shellescape=\z@
+ \PackageWarningNoLine{feynmp-auto}
+ {The automatic feature can't be used\MessageBreak
+ because `shell escape' is disabled}
+\fi
+\ifpdf
+ \DeclareGraphicsRule{*}{mps}{*}{}
+\fi
+\ifxetex
+ \DeclareGraphicsRule{*}{eps}{*}{}
+\fi
+\ifdefined\pdf@filemdfivesum
+ \def\fnmpa@mdfivesum{0}
+ \def\fnmpa@gethash{%
+ \IfFileExists{\thefmffile.mp}
+ {\edef\fnmpa@mdfivesum{\pdf@filemdfivesum{\thefmffile.mp}}}
+ {}%
+ }
+ \def\fnmpa@processmp{%
+ \IfFileExists{\thefmffile.mp}
+ {\fnmpa@compare}
+ {}%
+ }
+ \def\fnmpa@compare{%
+ \ifnum\pdf@strcmp{\fnmpa@mdfivesum}{\pdf@filemdfivesum{\thefmffile.mp}}=\z@
+ % do nothing, the files is unmodified
+ \else
+ \immediate\write18{mpost \thefmffile}%
+ \fi
+ }
+\else
+ \let\fnmpa@gethash\relax
+ \def\fnmpa@processmp{%
+ \IfFileExists{\thefmffile.mp}{\immediate\write18{mpost \thefmffile}}{}%
+ }
+\fi
+\def\fmffile#1{%
+ \def\thefmffile{#1}%
+ \equaltojobname{\thefmffile}{%
+ \PackageError{feynmp}
+ {The argument of \fmffile MUST NOT be identical\MessageBreak
+ to the name of your main input file! I will use fmfdefault.mf\MessageBreak
+ this time around, but you'd better fix your code now!}%
+ {Invalid argument to \string\fmffile!}%
+ \def\thefmffile{fmfdefault}}{}%
+ \if@fmfio
+ \fnmpa@gethash % Added
+ \@ifundefined{ifmeasuring@}%
+ {}%
+ {\def\if@fmfio{\ifmeasuring@\else}}%
+ \immediate\openout\@outfmf=\thefmffile.mp\relax
+ \fmfcmd{\p@rcent\space \thefmffile.mp -- do not edit, %
+ generated automatically by \jobname.tex^^J%
+ input feynmp^^J%
+ require_RCS_revision "\fmf@revision";}%
+ \fi
+ \setcounter{fmfgraph}{0}}
+\def\endfmffile{%
+ \fmfcmd{\p@rcent\space the end.^^J%
+ end.^^J%
+ endinput;}%
+ \if@fmfio
+ \immediate\closeout\@outfmf
+ \fi
+ \fnmpa@processmp % Added
+ \let\thefmffile\relax
+}
+\endinput
+%%
+%% End of file `feynmp-auto.sty'.