Hi,

I played a bit around with --pdfarrange and found out that I couldn't do:
  texexec --pdfarrange --paper=a5*a4,landscape --print='2UP,doublesided' file.pdf

Since: paper becomes [A5][A4,LANDSCAPE] and /.*2UP.*/ becomes
[2UP,doublesided,rotated] and I don't want to have it rotated.

The attached patch makes TeXExec a bit more flexiable.

Hans, please apply.

Tobias
--- /tmp/foo/texexec.pl Thu Aug  7 00:00:00 2003
+++ context/perltk/texexec.pl   Mon Aug 25 11:47:58 2003
@@ -1135,7 +1135,7 @@
           { print OPT "\\setuppapersize[A5][A4]\n" }
         elsif (!/standard/)
           { s/x/\*/io ;
-            if (/\w+\d+/) { $_ = uc $_ }
+            $_ =~ s/(\w+\d+)/\u$1\E/g;
             my ($from,$to) = split (/\*/) ;
             if ($to eq "") { $to = $from }
             print OPT "\\setuppapersize[$from][$to]\n" } }
@@ -1156,11 +1156,11 @@
               {$DupStr = ",\\v!dubbelzijdig" }
             if ($PrintFormat == '')
               { print OPT "\\setuparranging[\\v!normaal]\n" }
-            elsif ($PrintFormat =~ /.*up/goi)
+            elsif ($PrintFormat =~ /^\dup$/goi)
               { print OPT "\\setuparranging[2UP,\\v!geroteerd$DupStr]\n" }
-            elsif ($PrintFormat =~ /.*down/goi)
+            elsif ($PrintFormat =~ /^\ddown$/goi)
               { print OPT "\\setuparranging[2DOWN,\\v!geroteerd$DupStr]\n" }
-            elsif ($PrintFormat =~ /.*side/goi)
+            elsif ($PrintFormat =~ /^\dside$/goi)
               { print OPT "\\setuparranging[2SIDE,\\v!geroteerd$DupStr]\n" }
             else
               { print OPT "\\setuparranging[$PrintFormat]\n" } }

Reply via email to