summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/support/latexmk/example_rcfiles
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-12-11 22:30:30 +0000
committerKarl Berry <karl@freefriends.org>2011-12-11 22:30:30 +0000
commitbca3b6017c5eda5d6c5d67bb266062fb7f363b5b (patch)
tree4982edcfc2080e1c96ac6d3d3a7b83655c273393 /Master/texmf-dist/doc/support/latexmk/example_rcfiles
parent66913a012bff67aeac726ca83cbaffcafbae1118 (diff)
latexmk 4.30a (10dec11)
git-svn-id: svn://tug.org/texlive/trunk@24819 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/support/latexmk/example_rcfiles')
-rw-r--r--Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc26
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
new file mode 100644
index 00000000000..d77cdc41c13
--- /dev/null
+++ b/Master/texmf-dist/doc/support/latexmk/example_rcfiles/mpost_latexmkrc
@@ -0,0 +1,26 @@
+# 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
+# ($out_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):
+ if ( ($path ne '') && ($path ne '.\') ) {
+ foreach ( "$name.1", "$name.log" ) { move $_, $aux_dir; }
+ }
+ return $return;
+}
+