diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/latexmk/example_rcfiles/mpost_latexmkrc |
Initial commit
Diffstat (limited to 'support/latexmk/example_rcfiles/mpost_latexmkrc')
-rw-r--r-- | support/latexmk/example_rcfiles/mpost_latexmkrc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/support/latexmk/example_rcfiles/mpost_latexmkrc b/support/latexmk/example_rcfiles/mpost_latexmkrc new file mode 100644 index 0000000000..c1b3e13d4f --- /dev/null +++ b/support/latexmk/example_rcfiles/mpost_latexmkrc @@ -0,0 +1,28 @@ +# N.B. ===> (3, 4 Mar 2014) This file contains a correction relative to +# the previous version + +# This shows how to use mpost, as used by the feynmp package. +# The feynmp package writes files with extension .mp, e.g., foo.mp, +# and these are to be converted by mpost to make postscript files, +# e.g., foo.1, which are later read in by dvips. +# +# A more complicated custom dependency is needed than normal, because: +# if the output directory ($out_dir) or the auxiliary directory +# ($aux_dir) is set, mpost doesn't put its output in the correct +# place. + +add_cus_dep( 'mp', '1', 0, 'mpost' ); + + +sub mpost { + my $file = $_[0]; + my ($name, $path) = fileparse( $file ); + my $return = system "mpost \"$file\""; + # Fix the problem that mpost puts its output and log files + # in the current directory, not in the auxiliary directory + # (which is often the same as the output directory): + move "$name.1", $path; + move "$name.log", $aux_dir; + return $return; +} + |