From 4f71d4ff0d1e7ff4607b58eb7d030bd860e44f3a Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 4 Apr 2020 03:02:28 +0000 Subject: CTAN sync 202004040302 --- macros/latex/contrib/import/README | 2 +- macros/latex/contrib/import/import.pdf | Bin 243069 -> 243114 bytes macros/latex/contrib/import/import.sty | 40 ++++++++++++++++++++++++++------- macros/latex/contrib/import/import.tex | 8 +++---- 4 files changed, 37 insertions(+), 13 deletions(-) (limited to 'macros/latex/contrib/import') diff --git a/macros/latex/contrib/import/README b/macros/latex/contrib/import/README index 8f6f9549c3..958814c804 100644 --- a/macros/latex/contrib/import/README +++ b/macros/latex/contrib/import/README @@ -1,4 +1,4 @@ -import.sty Version 6.1 06-Mar-2020 +import.sty Version 6.2 01-Apr-2020 Donald Arseneau (asnd@triumf.ca) Vancouver, Canada. This software is in the public domain; free of any restrictions. diff --git a/macros/latex/contrib/import/import.pdf b/macros/latex/contrib/import/import.pdf index c05163699e..a7e07e5422 100644 Binary files a/macros/latex/contrib/import/import.pdf and b/macros/latex/contrib/import/import.pdf differ diff --git a/macros/latex/contrib/import/import.sty b/macros/latex/contrib/import/import.sty index e22e32a790..69bc86215e 100644 --- a/macros/latex/contrib/import/import.sty +++ b/macros/latex/contrib/import/import.sty @@ -1,4 +1,4 @@ -% import.sty Ver 6.0 22-Jan-2020 Donald Arseneau (asnd@triumf.ca) +% import.sty Ver 6.2 01-Apr-2020 Donald Arseneau (asnd@triumf.ca) % % This software is in the public domain; free of any restrictions. % @@ -38,11 +38,11 @@ % definition ensures paths end with "/" on most systems, but removes % "][" from within sub-import directory paths on VMS systems. % -% Presently, the paths are defined ``locally'' so input files must have -% balanced grouping. +% Presently, the paths are defined `locally' (not globally) so input +% files must have balanced grouping. %====================== END INSTRUCTIONS =========================== -\ProvidesPackage{import}[2020/01/22 \space v 6.0] +\ProvidesPackage{import}[2020/04/01 \space v 6.2] \ProcessOptions \@ifundefined{import}{% @@ -84,7 +84,7 @@ \protected@edef\input@path{{\import@path}#2}% \protected@edef\Ginput@path{{\import@path}#3}% \protected@edef\import@path@file{% use full path/file for non-* - \ifx\IfFileExists\@iffileonpath\else \import@path\fi #7}% + \import@path #7}% % \expandafter#1\expandafter{\import@path@file}% % @@ -96,6 +96,8 @@ % Our version of \IfFileExists that gives priority to files on \input@path, % #1 = file name, #2 = action when exists, #3 = action when not exists +% In 2020 LaTeX redefines \IfFileExists, so I need two variants. +\@ifundefined{IfFileExists@}{% pre-2020 \long\def \im@iffileexists#1#2#3{% \let\@filef@und\@undefined \ifx\input@path\@undefined\else @@ -112,10 +114,31 @@ \edef\@filef@und{#1 }% \def\reserved@a{#2}% \fi\fi - \reserved@a -} + \reserved@a} +}{% ca 2020 +\DeclareRobustCommand\im@iffileexists[1]{% + \set@curr@file{#1}% + \expandafter\im@iffileexists@\expandafter{\@curr@file}} +\long\def \im@iffileexists@#1#2#3{% + \let\@filef@und\@undefined + \ifx\input@path\@undefined\else + \@iffileonpath{#1}{% (also defines \@filef@und) + \def\reserved@a{#2}% + }{}% no action yet for not found + \fi + \ifx\@filef@und\@undefined % not found on \input@path + \openin\@inputcheck"#1" % + \ifeof\@inputcheck + \def\reserved@a{#3}% + \else + \closein\@inputcheck + \edef\@filef@und{"#1" }% + \def\reserved@a{#2}% + \fi\fi + \reserved@a} + } -\let\im@@IfFileExists\IfFileExists +\let\im@@IfFileExists\IfFileExists % remember original \gdef\import@path{} \let\import@path@fix\@firstofone % default @@ -129,6 +152,7 @@ \fi % Check for "[]" currdir (VMS file names) and set \import@path@fix appropriately +% \subimport{[.subdir]}{file} \gdef\@gtempa{[]} \ifx\@gtempa\@currdir % VMS directory syntax \gdef\import@path@fix#1{\@gobbleVMSbrack#1][>} diff --git a/macros/latex/contrib/import/import.tex b/macros/latex/contrib/import/import.tex index ea02e30f2d..83d0f9a721 100644 --- a/macros/latex/contrib/import/import.tex +++ b/macros/latex/contrib/import/import.tex @@ -9,7 +9,7 @@ \usepackage{microtype} %\usepackage{hyperref} -\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} +%\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} \newcommand*{\pkg}[1]{\textsf{#1}} \newcommand*{\cls}[1]{\textsf{#1}} \newcommand*{\cs}[1]{\texttt{\textbackslash#1}} @@ -26,7 +26,7 @@ \title{The import package} \author{Donald Arseneau (\texttt{asnd@triumf.ca})} -\date{Version 6.1, \quad 06--Mar--2020} +\date{Version 6.2, \quad 01--Apr--2020} \setlength{\parskip}{5pt plus 2pt minus 1pt} @@ -113,7 +113,7 @@ Note that the import package works by manipulating the internal `commands' \cmd{\input@path} and \cmd{\Ginput@path}, so may behave badly if you redefine them manually, or via another package, within the document. -Presently, the paths are defined `locally' so input files must have -balanced grouping. +Presently, the paths are defined `locally' (not globally) so input files must +have balanced grouping. \end{document} -- cgit v1.2.3