[tex-k] Allow epstopdf input.eps output.pdf ?

Norbert Preining preining at logic.at
Thu Jan 5 01:37:32 CET 2017


> I checked the source code, we do NOT allow multiple arguments
> by now, not at all.
> 
> So we can simply add the .eps .pdf case, I will work on a patch

What about that:
diff --git a/Master/texmf-dist/scripts/epstopdf/epstopdf.pl b/Master/texmf-dist/scripts/epstopdf/epstopdf.pl
index 2b5657e2138..281f7e0bc29 100755
--- a/Master/texmf-dist/scripts/epstopdf/epstopdf.pl
+++ b/Master/texmf-dist/scripts/epstopdf/epstopdf.pl
@@ -497,7 +497,18 @@ if ($::opt_filter) {
   debug "Filtering: will read standard input";
 } else {
   @ARGV > 0 or errorUsage "Input filename missing";
-  @ARGV < 2 or errorUsage "Unknown option or too many input files";
+  if (@ARGV == 2) {
+    if ($ARGV[1] ~= m/\.pdf$/i) {
+      if (! $::opt_outfile) {
+        $::opt_outfile = $ARGV[1];
+      } else {
+        errorUsage "Multiple output specifications (second file and --outfile)";
+      }
+    } else {
+      errorUsage "Second argument requires .pdf extensions";
+    }
+  }
+  @ARGV > 2 and errorUsage "Unknown option or too many input files";
   $InputFilename = $ARGV[0];
   #-r $InputFilename or error "\"$InputFilename\" not readable";
   debug "Input filename:", $InputFilename;

Norbert

--
PREINING Norbert                               http://www.preining.info
Accelia Inc.     +    JAIST     +    TeX Live     +    Debian Developer
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


More information about the tex-k mailing list