texlive[41287] Build/source/extra/epstopdf: --gray: new option, from

commits+karl at tug.org commits+karl at tug.org
Sat May 28 20:09:45 CEST 2016


Revision: 41287
          http://tug.org/svn/texlive?view=revision&revision=41287
Author:   karl
Date:     2016-05-28 20:09:45 +0200 (Sat, 28 May 2016)
Log Message:
-----------
--gray: new option, from William Bader,
http://tug.org/pipermail/tex-k/2016-February/002661.html

Modified Paths:
--------------
    trunk/Build/source/extra/epstopdf/Makefile
    trunk/Build/source/extra/epstopdf/epstopdf.1
    trunk/Build/source/extra/epstopdf/epstopdf.pl

Added Paths:
-----------
    trunk/Build/source/extra/epstopdf/test-tiger.eps

Modified: trunk/Build/source/extra/epstopdf/Makefile
===================================================================
--- trunk/Build/source/extra/epstopdf/Makefile	2016-05-28 17:39:04 UTC (rev 41286)
+++ trunk/Build/source/extra/epstopdf/Makefile	2016-05-28 18:09:45 UTC (rev 41287)
@@ -15,6 +15,7 @@
        check-atend \
        check-binary check-bin2 \
        check-binhdr-lf check-binhdr-cr check-binhdr-crlf \
+       check-gray \
        check-gscmd check-gsopt check-gsopts \
        check-filter check-filter-outfile \
        check-gscmd \
@@ -70,20 +71,24 @@
 	cat test-simple.eps | $(e2p) --outfile=test-filter.pdf --filter
 	pdfinfo test-filter.pdf | grep "Page size:"
 
+check-gray:
+	$(e2p) --gray test-tiger.eps
+	pdfinfo test-tiger.pdf | grep "Page size:"
+
 check-write-error:
-	-$(e2p) test-simple.eps --outfile=/dev/full
+	! $(e2p) test-simple.eps --outfile=/dev/full
 
 check-gscmd:
-	-$(e2p) --gscmd=true test-simple.eps
-	-$(e2p) --gscmd='foo bar' test-simple.eps # fails
+	! $(e2p) --gscmd=true test-simple.eps
+	! $(e2p) --gscmd='foo bar' test-simple.eps # fails
 
 check-gsopt:
-	-$(e2p) --gscmd=echo --gsopt=foo --gsopt=bar test-simple.eps
-	-$(e2p) --restricted --gsopt=bar test-simple.eps # fails
+	! $(e2p) --gscmd=echo --gsopt=foo --gsopt=bar test-simple.eps
+	! $(e2p) --restricted --gsopt=bar test-simple.eps # fails
 
 check-gsopts:
-	-$(e2p) --gscmd=echo --gsopts='foo bar' test-simple.eps
-	-$(e2p) --restricted --gsopts=bar test-simple.eps # fails
+	! $(e2p) --gscmd=echo --gsopts='foo bar' test-simple.eps
+	! $(e2p) --restricted --gsopts=bar test-simple.eps # fails
 
 check-simple:
 	$(MAKE) file=test-simple check1

Modified: trunk/Build/source/extra/epstopdf/epstopdf.1
===================================================================
--- trunk/Build/source/extra/epstopdf/epstopdf.1	2016-05-28 17:39:04 UTC (rev 41286)
+++ trunk/Build/source/extra/epstopdf/epstopdf.1	2016-05-28 18:09:45 UTC (rev 41287)
@@ -35,21 +35,21 @@
 otherwise, the default is to construct the output file name by replacing
 any extension in the input file with `.pdf'.
 .IP "\fB--\fP[\fBno\fP]\fBdebug\fP"
-write debugging info (default: off).
+write debugging info (default: false).
 .IP "\fB--\fP[\fBno\fP]\fBexact\fP"
-scan ExactBoundingBox (default: off).
+scan ExactBoundingBox (default: false).
 .IP "\fB--\fP[\fBno\fP]\fBfilter\fP"
 read standard input and (unless \fB--outfile\fP is given) write standard
-output (default: off).
+output (default: false).
 .IP "\fB--\fP[\fBno\fP]\fBgs\fP"
-run Ghostscript (default: on).  With \fB--nogs\fP, output (to standard
+run Ghostscript (default: true).  With \fB--nogs\fP, output (to standard
 output by default) the PostScript that would normally be converted; that
 is, the input PostScript as modified by \fBepstopdf\fP.
 .IP "\fB--\fP[\fBno\fP]\fBhires\fP"
-scan HiresBoundingBox (default: off).
+scan HiresBoundingBox (default: false).
 .IP "\fB--restricted\fP=\fIval\fP"
-turn on restricted mode (default: [on for repstopdf, else off]);
-this forbids the use of \fB--gscmd\fP and \fB--gsopt\fP and imposes
+turn on restricted mode (default: [true for repstopdf, else false]);
+this forbids the use of \fB--gscmd\fP and other options and imposes
 restrictions on the input and output file names according to the values
 of openin_any and openout_any (see the Web2c manual, http://tug.org/web2c).
 .PP
@@ -57,25 +57,27 @@
 .IP "\fB--gscmd\fP=\fIval\fP"
 pipe output to \fIval\fP (default: [\fBgswin32c\fP on Windows, else \fBgs\fP])
 .IP "\fB--gsopt\fP=\fIval\fP"
-include \fIval\fP as one argument in the gs command (can be repeated),
+include \fIval\fP as one argument in the gs command (can be repeated).
 .IP "\fB--gsopts\fP=\fIval\fP"
-split \fIval\fP at whitespace, include each resulting word as an
-argument in the gs command (can be repeated)
+split \fIval\fP at whitespace and include each resulting word as an
+argument in the gs command (can be repeated).
 .IP "\fB--autorotate\fP=\fIval\fP"
 set AutoRotatePages (default: None); recognized \fIval\fP choices:
 None, All, PageByPage.  For EPS files, PageByPage is equivalent to All.
 .IP "\fB--\fP[\fBno\fP]\fBcompress\fP"
-use compression in the output (default: on).
+use compression in the output (default: true).
 .IP "\fB--device\fP=\fIdev\fP"
 use -sDEVICE=\fIdev\fP (default: pdfwrite); not allowed in restricted mode.
 .IP "\fB--\fP[\fBno\fP]\fBembed\fP"
-embed fonts (default: on).
+embed fonts (default: true).
+.IP "\fB--\fP[\fBno\fP]\fBgray\fP"
+grayscale output (default: false).
 .IP "\fB--pdfsettings\fP=\fIval\fP"
 use -dPDFSETTINGS=/\fIval\fP (default is `prepress' if \fB--embed\fP,
 else empty); recognized \fIval\fP choices: screen, ebook, printer,
-prepress, default.
+repress, default.
 .IP "\fB--\fP[\fBno\fP]\fBquiet\fP"
-use -q, a.k.a. -dQUIET (default: off).
+use -q, a.k.a. -dQUIET (default: false).
 .IP "\fB--res\fP=\fIdpi, dpi\fPx\fIdpi\fP"
 set image resolution (default: [use gs default]); ignored if
 \fB--debug\fP is set.

Modified: trunk/Build/source/extra/epstopdf/epstopdf.pl
===================================================================
--- trunk/Build/source/extra/epstopdf/epstopdf.pl	2016-05-28 17:39:04 UTC (rev 41286)
+++ trunk/Build/source/extra/epstopdf/epstopdf.pl	2016-05-28 18:09:45 UTC (rev 41287)
@@ -34,12 +34,15 @@
 # "%%BoundingBox: (atend)" when input is not seekable (e.g., from a pipe),
 #
 # emacs-page
-my $ver = "2.23";
+my $ver = "2.24";
 
 # History
-#  2016// (Karl Berry)
+#  2016/05/28 v2.24 (Karl Berry)
+#    * new option --gray; patch from William Bader,
+#      tex-k mail 9 Feb 2016 19:37:08.
 #    * disallow --device completely in restricted mode,
 #      to avoid maintenance of device list.
+#      tex-live mail 10 Feb 2016 10:36:26.
 #  2015/01/22 v2.23 (Karl Berry)
 #    * use # instead of = to placate msys; report from KUROKI Yusuke,
 #      tex-k mail 20 Jan 2015 12:40:16.
@@ -206,6 +209,7 @@
 $::opt_embed = 1;
 $::opt_exact = 0;
 $::opt_filter = 0;
+$::opt_gray = 0;
 $::opt_gs = 1;
 $::opt_gscmd = "";
 @::opt_gsopt = ();
@@ -358,6 +362,7 @@
   --(no)compress     use compression        (default: $bool[$::opt_compress])
   --device=DEV       use -sDEVICE=DEV       (default: $::opt_device)
   --(no)embed        embed fonts            (default: $bool[$::opt_embed])
+  --(no)gray         grayscale output       (default: $bool[$::opt_gray])
   --pdfsettings=VAL  use -dPDFSETTINGS=/VAL (default is prepress if --embed,
                        else empty); recognized VAL choices:
                        screen, ebook, printer, prepress, default.
@@ -383,8 +388,8 @@
 More about the options for Ghostscript:
   Additional options to be used with gs can be specified
     with either or both of the two cumulative options --gsopts and --gsopt.
-  --gsopts takes a single string of options, which is split at whitespace,
-    each resulting word then added to the gs command line individually.
+  --gsopts takes a single string of options, which is split at whitespace
+    and each resulting word then added to the gs command line individually.
   --gsopt adds its argument as a single option to the gs command line.
     It can be used multiple times to specify options separately,
     and is necessary if an option or its value contains whitespace.
@@ -394,10 +399,9 @@
 
 All options to epstopdf may start with either - or --, and may be
 unambiguously abbreviated.  It is best to use the full option name in
-scripts, though, to avoid possible collisions with new options in the
-future.
+scripts to avoid possible collisions with new options in the future.
 
-When reporting bugs, please include an input file and command line
+When reporting bugs, please include an input file and all command line
 options so the problem can be reproduced.
 
 Report bugs to: tex-k\@tug.org
@@ -413,6 +417,7 @@
   "device=s",
   "embed!",
   "exact!",
+  "gray!",
   "filter!",
   "gs!",
   "gscmd=s",              # \ref{val_gscmd}
@@ -565,9 +570,11 @@
   -dEmbedAllFonts=true
 ] if $::opt_embed;
 
-
 push @GS, '-dUseFlateCompression=false' unless $::opt_compress;
 
+push @GS, qw(-sColorConversionStrategy=Gray -dProcessColorModel=/DeviceGray)
+  if $::opt_gray;
+
 if ($::opt_res and
     not $::opt_res =~ /^(\d+(x\d+)?)$/) {
   warnerr "Invalid resolution: $opt_res";

Added: trunk/Build/source/extra/epstopdf/test-tiger.eps
===================================================================
(Binary files differ)

Index: trunk/Build/source/extra/epstopdf/test-tiger.eps
===================================================================
--- trunk/Build/source/extra/epstopdf/test-tiger.eps	2016-05-28 17:39:04 UTC (rev 41286)
+++ trunk/Build/source/extra/epstopdf/test-tiger.eps	2016-05-28 18:09:45 UTC (rev 41287)

Property changes on: trunk/Build/source/extra/epstopdf/test-tiger.eps
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/postscript
\ No newline at end of property


More information about the tex-live-commits mailing list