texlive[52238] Master/texmf-dist: mptopdf

commits+karl at tug.org commits+karl at tug.org
Tue Oct 1 18:40:06 CEST 2019


Revision: 52238
          http://tug.org/svn/texlive?view=revision&revision=52238
Author:   karl
Date:     2019-10-01 18:40:05 +0200 (Tue, 01 Oct 2019)
Log Message:
-----------
mptopdf

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man
    trunk/Master/texmf-dist/doc/man/man1/mptopdf.1
    trunk/Master/texmf-dist/scripts/context/perl/mptopdf.pl

Modified: trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man
===================================================================
--- trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man	2019-10-01 16:39:42 UTC (rev 52237)
+++ trunk/Master/texmf-dist/doc/context/scripts/mkii/mptopdf.man	2019-10-01 16:40:05 UTC (rev 52238)
@@ -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

Modified: trunk/Master/texmf-dist/doc/man/man1/mptopdf.1
===================================================================
--- trunk/Master/texmf-dist/doc/man/man1/mptopdf.1	2019-10-01 16:39:42 UTC (rev 52237)
+++ trunk/Master/texmf-dist/doc/man/man1/mptopdf.1	2019-10-01 16:40:05 UTC (rev 52238)
@@ -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

Modified: trunk/Master/texmf-dist/scripts/context/perl/mptopdf.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/context/perl/mptopdf.pl	2019-10-01 16:39:42 UTC (rev 52237)
+++ trunk/Master/texmf-dist/scripts/context/perl/mptopdf.pl	2019-10-01 16:40:05 UTC (rev 52238)
@@ -118,9 +118,14 @@
     @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 @@
             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  ;
     }
 }



More information about the tex-live-commits mailing list