summaryrefslogtreecommitdiff
path: root/scripts/context/perl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2005-07-13 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2005-07-13 00:00:00 +0200
commitc7f924443bf5e21f5cd9210fc76c633a3a77e20e (patch)
tree43b35cb107e3c369f19d7b0147a6476a0dcda0cc /scripts/context/perl
parent606ac7d65f5f5974ae7926e84dfb34849ce96db8 (diff)
downloadcontext-c7f924443bf5e21f5cd9210fc76c633a3a77e20e.tar.gz
stable 2005.07.13
Diffstat (limited to 'scripts/context/perl')
-rw-r--r--scripts/context/perl/mptopdf.pl34
1 files changed, 18 insertions, 16 deletions
diff --git a/scripts/context/perl/mptopdf.pl b/scripts/context/perl/mptopdf.pl
index 0528a4010..5b00d4679 100644
--- a/scripts/context/perl/mptopdf.pl
+++ b/scripts/context/perl/mptopdf.pl
@@ -26,14 +26,15 @@ use strict ;
$Getopt::Long::passthrough = 1 ; # no error message
$Getopt::Long::autoabbrev = 1 ; # partial switch accepted
-my $Help = my $Latex = my $RawMP = 0 ;
+my $Help = my $Latex = my $RawMP = my $MetaFun = 0 ;
my $PassOn = '' ;
&GetOptions
- ( "help" => \$Help ,
- "rawmp" => \$RawMP,
- "passon" => \$PassOn,
- "latex" => \$Latex ) ;
+ ( "help" => \$Help ,
+ "rawmp" => \$RawMP,
+ "metafun" => \$MetaFun,
+ "passon" => \$PassOn,
+ "latex" => \$Latex ) ;
my $program = "MPtoPDF 1.3" ;
my $pattern = $ARGV[0] ;
@@ -70,7 +71,12 @@ elsif ($pattern =~ /\.mp$/io)
if ($RawMP)
{ if ($Latex)
{ $rest .= " $mplatexswitch" }
- $mpbin = 'mpost' }
+ if ($MetaFun) {
+ $mpbin = 'mpost --mem=mpost' ;
+ } else {
+ $mpbin = 'mpost --mem=metafun' ;
+ }
+ }
else
{ if ($Latex)
{ $rest .= " $texlatexswitch" }
@@ -93,19 +99,15 @@ foreach my $file (@files)
{ $_ = $file ;
if (s/\.(\d+|mps)$// && -e $file)
{ if ($miktex)
- { if ($dosish)
- { $command = "pdfetex &mptopdf" }
- else
- { $command = "pdfetex \\&mptopdf" } }
+ { $command = "pdfetex -fmt=mptopdf" }
else
- { if ($dosish)
- { $command = "pdfetex -progname=context &mptopdf" }
- else
- { $command = "pdfetex -progname=context \\&mptopdf" } }
+ { $command = "pdfetex -progname=context -fmt=mptopdf" }
if ($dosish)
- { system ("$command \\relax $file") }
+ { $command = "$command \\relax $file" }
else
- { system ("$command \\\\relax $file") }
+ { $command = "$command \\\\relax $file" }
+ #~ print $command ;
+ system($command) ;
rename ("$_.pdf", "$_-$1.pdf") ;
if (-e "$_.pdf") { CopyFile ("$_.pdf", "$_-$1.pdf") }
if ($done) { $report .= " +" }