diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/mptopdf.1 | 2 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/context/perl/mptopdf.pl | 24 |
3 files changed, 20 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man b/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man index c6f4655e08b..56be8180671 100644 --- a/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man +++ b/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man @@ -1,4 +1,4 @@ -.TH "mptopdf" "1" "01-01-2018" "version 1.4.1" "convert MetaPost figures to PDF" +.TH "mptopdf" "1" "01-01-2019" "version 1.4.1" "convert MetaPost figures to PDF" .SH NAME .B mptopdf .SH SYNOPSIS diff --git a/Master/texmf-dist/doc/man/man1/mptopdf.1 b/Master/texmf-dist/doc/man/man1/mptopdf.1 index c6f4655e08b..56be8180671 100644 --- a/Master/texmf-dist/doc/man/man1/mptopdf.1 +++ b/Master/texmf-dist/doc/man/man1/mptopdf.1 @@ -1,4 +1,4 @@ -.TH "mptopdf" "1" "01-01-2018" "version 1.4.1" "convert MetaPost figures to PDF" +.TH "mptopdf" "1" "01-01-2019" "version 1.4.1" "convert MetaPost figures to PDF" .SH NAME .B mptopdf .SH SYNOPSIS diff --git a/Master/texmf-dist/scripts/context/perl/mptopdf.pl b/Master/texmf-dist/scripts/context/perl/mptopdf.pl index 42db9001ec4..165d4d2179f 100755 --- a/Master/texmf-dist/scripts/context/perl/mptopdf.pl +++ b/Master/texmf-dist/scripts/context/perl/mptopdf.pl @@ -118,9 +118,14 @@ if (($pattern eq '')||($Help)) { @files = glob "$pattern" ; } +# this patch was send via debian but is not tested by me + foreach my $file (@files) { $_ = $file ; - if (s/\.(\d+|mps)$// && -e $file) { + # if (s/\.(\d+|mps)$// && -e $file) { + if (s/\.(\d+|mps|ps)$// && -e $file) { + my $suffix = $1 ; + my $pdf = basename($_).".pdf" ; if ($miktex) { $command = "pdftex -undump=mptopdf" ; } else { @@ -136,15 +141,22 @@ foreach my $file (@files) { print "\n$program : error while processing tex file\n" ; exit 1 ; } - my $pdfsrc = basename($_).".pdf"; - rename ($pdfsrc, "$_-$1.pdf") ; - if (-e $pdfsrc) { - CopyFile ($pdfsrc, "$_-$1.pdf") ; + # my $pdfsrc = basename($_).".pdf"; + # rename ($pdfsrc, "$_-$1.pdf") ; + # if (-e $pdfsrc) { + # CopyFile ($pdfsrc, "$_-$1.pdf") ; + if ($suffix =~ m/\.\d+$/) { + rename ($pdf, "$_-$suffix.pdf") ; + if (-e $pdf) { + CopyFile ($pdf, "$_-$suffix.pdf") ; + } + $pdf = "$_-$suffix.pdf" ; } if ($done) { $report .= " +" ; } - $report .= " $_-$1.pdf" ; + # $report .= " $_-$1.pdf" ; + $report .= " $pdf" ; ++$done ; } } |