summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/graphics/graphics.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/graphics/graphics.dtx')
-rw-r--r--Master/texmf-dist/source/latex/graphics/graphics.dtx48
1 files changed, 39 insertions, 9 deletions
diff --git a/Master/texmf-dist/source/latex/graphics/graphics.dtx b/Master/texmf-dist/source/latex/graphics/graphics.dtx
index 028f0658527..f2471e94bbb 100644
--- a/Master/texmf-dist/source/latex/graphics/graphics.dtx
+++ b/Master/texmf-dist/source/latex/graphics/graphics.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% graphics.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
-%% Copyright (C) 1995--2017 David Carlisle, LaTeX3 Project
+%% Copyright (C) 1995-2019 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
@@ -14,12 +14,18 @@
%<*dtx>
\ProvidesFile{graphics.dtx}
%</dtx>
-%<package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-%<package>\ProvidesPackage{graphics}
+%<+package>\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+%<+package>\providecommand\DeclareRelease[3]{}
+%<+package>\providecommand\DeclareCurrentRelease[2]{}
+%<+package>
+%<+package>\DeclareRelease{}{2017-06-25}{graphics-2017-06-25.sty}
+%<+package>\DeclareCurrentRelease{}{2019-10-01}
+%<+package>
+%<+package>\ProvidesPackage{graphics}
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)]
+ [2019/07/20 v1.3b Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1000,8 +1006,9 @@
% \end{macro}
%
% \begin{macro}{\Gin@getbase}
-% \changes{v0.6a}{1994/11/29}
-% {remove \cs{Gin@sep}}
+% \changes{v0.6a}{1994/11/29} {remove \cs{Gin@sep}}
+% \changes{v1.3a}{2019/07/01} {Support UTF-8 and spaces}
+% \changes{v1.3b}{2019/07/20} {Delay adding quotes to filename}
% Given a possible extension, |#1|, check whether the file exists. If
% it does set |\Gin@base| and |\Gin@ext| to the filename stripped of
% the extension, and the extension, respectively.
@@ -1012,7 +1019,9 @@
\def\noexpand\Gin@base{####1}}}%
\IfFileExists{\filename@area\filename@base#1}%
{\Gin@tempa
- \expandafter\@tempa\@filef@und
+ \edef\uq@filef@und{\expandafter\unquote@name
+ \expandafter{\@filef@und}}%
+ \expandafter\@tempa\uq@filef@und
\edef\Gin@ext{#1}}{}}%
% \end{macrocode}
% \end{macro}
@@ -1043,11 +1052,29 @@
% {Add default (*) rule possibility}
% \changes{v0.6a}{1994/11/29}
% {remove \cs{Gin@sepdefault}}
+% \changes{v1.3a}{2019/07/01} {Support UTF-8 and spaces}
+% The quoting business for graphic files needs further sorting
+% out. This should be handled differently, right now we quote and
+% unquote all over the place as we still use the old code base.
+%
+% This also makes the file name displays weird!
+%
+% Guard |\detokenize| use for plain classic tex.
% \begin{macrocode}
\def\Ginclude@graphics#1{%
+ \ifx\detokenize\@undefined\else
+ \edef\Gin@extensions{\detokenize\expandafter{\Gin@extensions}}%
+ \fi
\begingroup
\let\input@path\Ginput@path
- \filename@parse{#1}%
+% \end{macrocode}
+% A lot of quote juggling going on here (room for improvements).
+% \begin{macrocode}
+ \set@curr@file{#1}%
+ \edef\uq@curr@file{\expandafter\unquote@name\expandafter{\@curr@file}}%
+ \expandafter\filename@parse\expandafter{\uq@curr@file}%
+ \edef\filename@area{\expandafter\quote@name\expandafter{\filename@area}}%
+ \edef\filename@base{\expandafter\quote@name\expandafter{\filename@base}}%
\ifx\filename@ext\relax
\@for\Gin@temp:=\Gin@extensions\do{%
\ifx\Gin@ext\relax
@@ -1381,8 +1408,11 @@
% {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}
+% Due to the space handling code file names are now already quoted
+% so we should not add any quotes around \verb=#1= any more.
+% \changes{v1.3b}{2019/07/20} {add quotes here again}
% \begin{macrocode}
- \immediate\openin\@inputcheck"#1" %
+ \immediate\openin\@inputcheck\quote@name{#1} %
#2{#1}%
% \end{macrocode}
% \changes{v0.3i}{1994/03/23}