[latex3-commits] [latex2e-public] r1489 - preparing for updates in graphics-def collection
noreply at latex-project.org
noreply at latex-project.org
Wed May 31 22:38:30 CEST 2017
Author: carlisle
Date: 2017-05-31 22:38:29 +0200 (Wed, 31 May 2017)
New Revision: 1489
Modified:
trunk/required/graphics/changes.txt
trunk/required/graphics/graphics.dtx
trunk/required/graphics/graphicx.dtx
Log:
preparing for updates in graphics-def collection
Modified: trunk/required/graphics/changes.txt
===================================================================
--- trunk/required/graphics/changes.txt 2017-05-25 10:58:02 UTC (rev 1488)
+++ trunk/required/graphics/changes.txt 2017-05-31 20:38:29 UTC (rev 1489)
@@ -3,7 +3,12 @@
completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2017-05-31 David Carlisle, Joseph Wright <latex-bugs at latex-project.org>
+ * graphics.dtx: Generalize bounding box reader for use in other formats than EPS
+ * graphicsx.dtx: Additional options, moved from pdftex.def
+
+
2017-04-14 David Carlisle <latex-bugs at latex-project.org>
* graphics.dtx: modify \Gscale at box for math mode usage
Modified: trunk/required/graphics/graphics.dtx
===================================================================
--- trunk/required/graphics/graphics.dtx 2017-05-25 10:58:02 UTC (rev 1488)
+++ trunk/required/graphics/graphics.dtx 2017-05-31 20:38:29 UTC (rev 1489)
@@ -19,7 +19,7 @@
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2017/04/14 v1.1b Standard LaTeX Graphics (DPC,SPQR)]
+ [2017/06/01 v1.2a Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1204,6 +1204,34 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\Gin at page}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard interface this is a no-op, but needs to be defined
+% to allow the caching code to be set up.
+% \begin{macrocode}
+\let\Gin at page\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifGin at interpolate}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard setting a no-op.
+% \begin{macrocode}
+\newif\ifGin at interpolate
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin at log}
+% \changes{v1.2a}{2017/06/01} {New macro} In the standard interface
+% this prints to the log but can be changed via keys in \textsf{graphicx}.
+% \begin{macrocode}
+\let\Gin at log\wlog
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\Gin at req@sizes}
% \begin{macro}{\Gin at scalex}
% \begin{macro}{\Gin at scaley}
@@ -1265,6 +1293,10 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\Gread at generic}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% \begin{macro}{\Gread at generic@aux}
% \begin{macro}{\Gread at eps}
% Read an EPS file (|#1|) and search for a line
% starting with |%%BoundingBox| and returns the result
@@ -1274,8 +1306,26 @@
% {Fix the catcodes of \cs{endlinechar} and ctrl-D}
% \changes{v0.7a}{1995/04/11}
% {Fix more catcodes, for binary headers of eps files}
+% \changes{v1.2a}{2017/06/01}
+% {Split to allow code reuse by \cs{Gread at extractbb} in
+% \texttt{dvipdfmx.def} driver}
+% \begin{macro}{\Gread at eps@aux}
% \begin{macrocode}
-\def\Gread at eps#1{%
+\def\Gread at generic#1#2{%
+ \edef\Gread at attr@hash{%
+ \ifx\Gin at page\@empty\else
+ :P\Gin at page
+ \fi
+ }%
+ \@ifundefined{#1 bbox\Gread at attr@hash}%
+ {\Gread at generic@aux{#1}{#2}}
+ {%
+ \expandafter\global\expandafter\let\expandafter\@gtempa
+ \csname #1 bbox\Gread at attr@hash\endcsname
+ }%
+ \expandafter\Gread at parse@bb\@gtempa\\
+}
+\def\Gread at generic@aux#1#2{%
\begingroup
% \end{macrocode}
% Make it reasonably safe to have binary headers in the EPS file
@@ -1306,8 +1356,29 @@
% information file, if possible.
% \changes{v0.4d}{1994/05/06}
% {Improve the error message if the info file is not there.}
+% \changes{v1.2a}{2017/06/01}
+% {Allow for spaces in name of a file}
% \begin{macrocode}
- \immediate\openin\@inputcheck#1 %
+ \immediate\openin\@inputcheck"#1" %
+ #2{#1}%
+% \end{macrocode}
+% \changes{v0.3i}{1994/03/23}
+% {Wording of error message improved}
+% \changes{v1.0}{1996/05/29}
+% {Use \cs{@gtempa} not \cs{g at tempa} /2090}
+% \begin{macrocode}
+ \ifGin at bbox\else
+ \@latex at error
+ {Cannot determine size of graphic in #1 (no BoundingBox)}%
+ \@ehc
+ \gdef\@gtempa{0 0 72 72 }%
+ \fi
+ \endgroup
+}
+\def\Gread at eps#1{%
+ \Gread at generic{#1}\Gread at eps@aux
+}
+\def\Gread at eps@aux#1{%
\ifeof\@inputcheck
\@latex at error{File `#1' not found}\@ehc
\else
@@ -1330,22 +1401,12 @@
\repeat
\immediate\closein\@inputcheck
\fi
+}
% \end{macrocode}
-% \changes{v0.3i}{1994/03/23}
-% {Wording of error message improved}
-% \changes{v1.0}{1996/05/29}
-% {Use \cs{@gtempa} not \cs{g at tempa} /2090}
-% \begin{macrocode}
- \ifGin at bbox\else
- \@latex at error
- {Cannot determine size of graphic in #1 (no BoundingBox)}%
- \@ehc
- \gdef\@gtempa{0 0 72 72 }%
- \fi
- \endgroup
- \expandafter\Gread at parse@bb\@gtempa\\}
-% \end{macrocode}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\Gread at find@bb}
% If a line in the EPS file starts with a |%%BoundingBox:|, we
Modified: trunk/required/graphics/graphicx.dtx
===================================================================
--- trunk/required/graphics/graphicx.dtx 2017-05-25 10:58:02 UTC (rev 1488)
+++ trunk/required/graphics/graphicx.dtx 2017-05-31 20:38:29 UTC (rev 1489)
@@ -2,7 +2,7 @@
% \iffalse
%
%% graphicx.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
-%% Copyright (C) 1995--2015 David Carlisle, LaTeX3 Project
+%% Copyright (C) 1995--2015,2017 David Carlisle, LaTeX3 Project
%%
%% This file is part of the Standard LaTeX `Graphics Bundle'.
%% It may be distributed under the terms of the LaTeX Project Public
@@ -17,7 +17,7 @@
%<driver> \ProvidesFile{graphicx.drv}
% \fi
% \ProvidesFile{graphicx.dtx}
- [2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)]
+ [2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -164,6 +164,9 @@
% size of the graphic. \emph{Only} for use with |type|.
% \item[command] Specify the file command.
% \emph{Only} for use with |type|.
+% \item[quiet] Turns off writing information about graphics to the |.log|.
+% \item[page] The page of a multi-page PDF graphic to be used.
+% \item[interpolate] Enables interpolation of bitmap images by viewers.
% \end{description}
%
% The arguments are interpreted left to right. |clip|, |draft|, |bb|,,
@@ -550,6 +553,39 @@
% \end{macrocode}
% \end{key}
%
+% \begin{key}{Gin}{quiet}
+% \changes{v1.1a}{2017/06/01}{New quiet key}
+% Skip writing to the log.
+% \begin{macrocode}
+\define at key{Gin}{quiet}{%
+ \let\Gin at log\@gobble
+}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{page}
+% \changes{v1.1a}{2017/06/01}{New page key}
+% Page of a multi-page (PDF) graphic.
+% \begin{macrocode}
+\define at key{Gin}{page}{%
+ \def\Gin at page{#1}%
+ \ifx\Gin at page\@empty
+ \else
+ \edef\Gin at page{\number\Gin at page}%
+ \fi
+}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{interpolate}
+% \changes{v1.1a}{2017/06/01}{New interpolate key}
+% Enable/disable interpolation of bitmap images by the viewer.
+% \begin{macrocode}
+\define at key{Gin}{interpolate}[true]{%
+ \lowercase{\Gin at boolkey{#1}}{interpolate}}
+% \end{macrocode}
+% \end{key}
+%
% \begin{macro}{\Gin at boolkey}
% Helper function for defining boolean valued functions. The order of
% arguments allows |\lowercase| to only act on the user-supplied
More information about the latex3-commits
mailing list