[tex-k] Issues in epstopdf in MSYS/MinGW system
KUROKI Yusuke
kuroky at users.sourceforge.jp
Tue Jan 20 04:40:16 CET 2015
Hello, the list,
I would like to report inconvenience of epstopdf(.pl)
in the MSYS (or MinGW) system, which is a mainly
developers' environment providing bash,
Unix-like text utilities, and more in Windows OS,
and make a proposal to improve it.
(1)
While using MSYS, system name is changed to "MSYS",
not "MSWin...". Since $GS should be gswin32 to use TeX
Live's tlgs distribution, $on_windows variable should be
also true when the system name is "MSYS".
(2)
MSYS changes some character strings including /
as shown at http://www.mingw.org/wiki/Posix_path_conversion .
The options to Ghostscript has /, then epstopdf fails.
Ghostscript's help says "(you can use # in place of =)"
and documentation says also "Ghostscript treats '#' the
same internally, and the '=' is mangled by the command
shell. " (e.g., at http://www.ghostscript.com/doc/current/Use.htm#MS_Windows)
epstopdf(.ps) has two cases giving option separated by "="
to Ghostscript; I think "=" should be "#" in both cases.
The attached file is a proposal patch to trunk of TeX Live repository.
Best,
-- KUROKI Yusuke
-------------- next part --------------
--- epstopdf.pl.orig 2015-01-18 17:55:00.025652200 +0900
+++ epstopdf.pl.new 2015-01-20 08:26:05.057988400 +0900
@@ -179,7 +179,7 @@
END_COPYRIGHT
my $title = "$program $ident\n";
-my $on_windows = $^O =~ /^MSWin/;
+my $on_windows = $^O =~ /^MSWin/ || $^O eq "msys";
my $on_windows_or_cygwin = $on_windows || $^O eq "cygwin";
### ghostscript command name
@@ -570,7 +570,7 @@
warnerr "Invalid value for --pdfsettings: $::opt_pdfsettings";
$::opt_pdfsettings = '';
}
-push @GS, "-dPDFSETTINGS=/$::opt_pdfsettings" if $::opt_pdfsettings;
+push @GS, "-dPDFSETTINGS#/$::opt_pdfsettings" if $::opt_pdfsettings;
push @GS, qw[
-dMaxSubsetPct=100
@@ -596,7 +596,7 @@
. "(use 'All', 'None' or 'PageByPage'";
$::opt_autorotate = '';
}
-push @GS, "-dAutoRotatePages=/$::opt_autorotate" if $::opt_autorotate;
+push @GS, "-dAutoRotatePages#/$::opt_autorotate" if $::opt_autorotate;
$rotmsg = $::opt_autorotate ? $::opt_autorotate : "[use gs default]";
foreach my $gsopt (@::opt_gsopt) {
More information about the tex-k
mailing list