summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/graphics')
-rw-r--r--Master/texmf-dist/source/latex/graphics/graphics.dtx117
-rw-r--r--Master/texmf-dist/source/latex/graphics/graphicx.dtx66
2 files changed, 160 insertions, 23 deletions
diff --git a/Master/texmf-dist/source/latex/graphics/graphics.dtx b/Master/texmf-dist/source/latex/graphics/graphics.dtx
index 94f199678ee..b8d50b41753 100644
--- a/Master/texmf-dist/source/latex/graphics/graphics.dtx
+++ b/Master/texmf-dist/source/latex/graphics/graphics.dtx
@@ -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>
@@ -564,16 +564,18 @@
% \begin{option}{dvipdfm}
% \changes{v1.0k}{1999/01/13}
% {dvipdfm added}
-% Mark Wick's dvipdfm driver.
+% \changes{v1.2a}{2017/06/01}
+% {make dvipdfm an alias for dvipdfmx}
+% Mark Wick's dvipdfm driver (now merged with xdvipdfmx).
% \begin{macrocode}
-\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfm.def}}
+\DeclareOption{dvipdfm}{\def\Gin@driver{dvipdfmx.def}}
% \end{macrocode}
% \end{option}
%
% \begin{option}{dvipdfmx}
% \changes{v1.0m}{2005/11/14}
% {dvipdfmx added}
-% The driver for the dvipdfmx project.
+% The driver for the dvipdfmx project (also supports xdvipdfmx).
% \begin{macrocode}
\DeclareOption{dvipdfmx}{\def\Gin@driver{dvipdfmx.def}}
% \end{macrocode}
@@ -1204,6 +1206,43 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\Gin@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@page\@empty
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@pagebox}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard interface always points to the |cropbox|.
+% \begin{macrocode}
+\def\Gin@pagebox{cropbox}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ifGin@interpolate}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% In the standard setting a no-op.
+% \begin{macrocode}
+\newif\ifGin@interpolate
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\Gin@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@log\wlog
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\Gin@req@sizes}
% \begin{macro}{\Gin@scalex}
% \begin{macro}{\Gin@scaley}
@@ -1265,6 +1304,10 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\Gread@generic}
+% \changes{v1.2a}{2017/06/01}
+% {New macro}
+% \begin{macro}{\Gread@generic@aux}
% \begin{macro}{\Gread@eps}
% Read an EPS file (|#1|) and search for a line
% starting with |%%BoundingBox| and returns the result
@@ -1274,8 +1317,29 @@
% {Fix the catcodes of \cs{endlinechar} and ctrl-D}
% \changes{v0.7a}{1995/04/11}
% {Fix more catcodes, for binary headers of eps files}
-% \begin{macrocode}
-\def\Gread@eps#1{%
+% \changes{v1.2a}{2017/06/01}
+% {Split to allow code reuse by \cs{Gread@extractbb} in
+% \texttt{dvipdfmx.def} driver}
+% \begin{macro}{\Gread@eps@aux}
+% \begin{macrocode}
+\def\Gread@generic#1#2{%
+ \edef\Gread@attr@hash{%
+ \ifx\Gin@pagebox\@empty\else
+ :\Gin@pagebox
+ \fi
+ \ifx\Gin@page\@empty\else
+ :P\Gin@page
+ \fi
+ }%
+ \@ifundefined{#1 bbox\Gread@attr@hash}%
+ {\Gread@generic@aux{#1}{#2}}
+ {%
+ \expandafter\global\expandafter\let\expandafter\@gtempa
+ \csname #1 bbox\Gread@attr@hash\endcsname
+ }%
+ \expandafter\Gread@parse@bb\@gtempa\\%
+}
+\def\Gread@generic@aux#1#2{%
\begingroup
% \end{macrocode}
% Make it reasonably safe to have binary headers in the EPS file
@@ -1306,8 +1370,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@tempa} /2090}
+% \begin{macrocode}
+ \ifGin@bbox\else
+ \@latex@error
+ {Cannot determine size of graphic in #1 (no BoundingBox)}%
+ \@ehc
+ \gdef\@gtempa{0 0 72 72 }%
+ \fi
+ \endgroup
+}
+\def\Gread@eps#1{%
+ \Gread@generic{#1}\Gread@eps@aux
+}
+\def\Gread@eps@aux#1{%
\ifeof\@inputcheck
\@latex@error{File `#1' not found}\@ehc
\else
@@ -1330,21 +1415,11 @@
\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@tempa} /2090}
-% \begin{macrocode}
- \ifGin@bbox\else
- \@latex@error
- {Cannot determine size of graphic in #1 (no BoundingBox)}%
- \@ehc
- \gdef\@gtempa{0 0 72 72 }%
- \fi
- \endgroup
- \expandafter\Gread@parse@bb\@gtempa\\}
-% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \begin{macro}{\Gread@find@bb}
diff --git a/Master/texmf-dist/source/latex/graphics/graphicx.dtx b/Master/texmf-dist/source/latex/graphics/graphicx.dtx
index 963acdde7ae..5c5bb2b7fe5 100644
--- a/Master/texmf-dist/source/latex/graphics/graphicx.dtx
+++ b/Master/texmf-dist/source/latex/graphics/graphicx.dtx
@@ -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,11 @@
% 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.
+% \item[pagebox] Specifies which PDF box should be used for the natural image size, one of
+% mediabox, cropbox, bleedbox, trimbox, artbox. The default is driver-specific.
% \end{description}
%
% The arguments are interpreted left to right. |clip|, |draft|, |bb|,,
@@ -550,6 +555,63 @@
% \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@key{Gin}{quiet}{%
+ \let\Gin@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@key{Gin}{page}{%
+ \def\Gin@page{#1}%
+ \ifx\Gin@page\@empty
+ \else
+ \edef\Gin@page{\number\Gin@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@key{Gin}{interpolate}[true]{%
+ \lowercase{\Gin@boolkey{#1}}{interpolate}}
+% \end{macrocode}
+% \end{key}
+%
+% \begin{key}{Gin}{pagebox}
+% \changes{v1.1a}{2017/06/01}{New pagebox key}
+% Specify which PDF box to use for the natural image size in PDF inclusions.
+% \begin{macrocode}
+\define@key{Gin}{pagebox}{%
+ \expandafter\let\expandafter\Gin@pagebox
+ \csname Gin@pagebox@#1\endcsname
+ \ifx\Gin@pagebox\relax
+ \let\Gin@pagebox\Gin@pagebox@cropbox
+ \@warning{%
+ Unknown value `#1' for `pagebox'.\MessageBreak
+ Supported values:\MessageBreak
+ mediabox, cropbox, bleedbox, trimbox, artbox%
+ }%
+ \fi
+ }
+ \def\Gin@pagebox@mediabox{mediabox}%
+ \def\Gin@pagebox@cropbox{cropbox}%
+ \def\Gin@pagebox@bleedbox{bleedbox}%
+ \def\Gin@pagebox@trimbox{trimbox}%
+ \def\Gin@pagebox@artbox{artbox}%
+% \end{macrocode}
+% \end{key}
+%
% \begin{macro}{\Gin@boolkey}
% Helper function for defining boolean valued functions. The order of
% arguments allows |\lowercase| to only act on the user-supplied