texlive[54683] Master/texmf-dist: import (4apr20)
commits+karl at tug.org
commits+karl at tug.org
Sun Apr 12 00:52:54 CEST 2020
Revision: 54683
http://tug.org/svn/texlive?view=revision&revision=54683
Author: karl
Date: 2020-04-12 00:52:54 +0200 (Sun, 12 Apr 2020)
Log Message:
-----------
import (4apr20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/import/README
trunk/Master/texmf-dist/doc/latex/import/import.pdf
trunk/Master/texmf-dist/doc/latex/import/import.tex
trunk/Master/texmf-dist/tex/latex/import/import.sty
Modified: trunk/Master/texmf-dist/doc/latex/import/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/import/README 2020-04-11 22:52:41 UTC (rev 54682)
+++ trunk/Master/texmf-dist/doc/latex/import/README 2020-04-11 22:52:54 UTC (rev 54683)
@@ -1,4 +1,4 @@
-import.sty Version 6.1 06-Mar-2020
+import.sty Version 6.2 01-Apr-2020
Donald Arseneau (asnd at triumf.ca) Vancouver, Canada.
This software is in the public domain; free of any restrictions.
Modified: trunk/Master/texmf-dist/doc/latex/import/import.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/import/import.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/import/import.tex 2020-04-11 22:52:41 UTC (rev 54682)
+++ trunk/Master/texmf-dist/doc/latex/import/import.tex 2020-04-11 22:52:54 UTC (rev 54683)
@@ -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 at 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 @@
\cmd{\input at path} and \cmd{\Ginput at 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}
Modified: trunk/Master/texmf-dist/tex/latex/import/import.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/import/import.sty 2020-04-11 22:52:41 UTC (rev 54682)
+++ trunk/Master/texmf-dist/tex/latex/import/import.sty 2020-04-11 22:52:54 UTC (rev 54683)
@@ -1,4 +1,4 @@
-% import.sty Ver 6.0 22-Jan-2020 Donald Arseneau (asnd at triumf.ca)
+% import.sty Ver 6.2 01-Apr-2020 Donald Arseneau (asnd at 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 at edef\input at path{{\import at path}#2}%
\protected at edef\Ginput at path{{\import at path}#3}%
\protected at edef\import at path@file{% use full path/file for non-*
- \ifx\IfFileExists\@iffileonpath\else \import at path\fi #7}%
+ \import at path #7}%
%
\expandafter#1\expandafter{\import at path@file}%
%
@@ -96,6 +96,8 @@
% Our version of \IfFileExists that gives priority to files on \input at 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 at iffileexists#1#2#3{%
\let\@filef at und\@undefined
\ifx\input at path\@undefined\else
@@ -112,10 +114,31 @@
\edef\@filef at und{#1 }%
\def\reserved at a{#2}%
\fi\fi
- \reserved at a
-}
+ \reserved at a}
+}{% ca 2020
+\DeclareRobustCommand\im at iffileexists[1]{%
+ \set at curr@file{#1}%
+ \expandafter\im at iffileexists@\expandafter{\@curr at file}}
+\long\def \im at iffileexists@#1#2#3{%
+ \let\@filef at und\@undefined
+ \ifx\input at path\@undefined\else
+ \@iffileonpath{#1}{% (also defines \@filef at und)
+ \def\reserved at a{#2}%
+ }{}% no action yet for not found
+ \fi
+ \ifx\@filef at und\@undefined % not found on \input at path
+ \openin\@inputcheck"#1" %
+ \ifeof\@inputcheck
+ \def\reserved at a{#3}%
+ \else
+ \closein\@inputcheck
+ \edef\@filef at und{"#1" }%
+ \def\reserved at a{#2}%
+ \fi\fi
+ \reserved at a}
+ }
-\let\im@@IfFileExists\IfFileExists
+\let\im@@IfFileExists\IfFileExists % remember original
\gdef\import at path{}
\let\import at path@fix\@firstofone % default
@@ -129,6 +152,7 @@
\fi
% Check for "[]" currdir (VMS file names) and set \import at path@fix appropriately
+% \subimport{[.subdir]}{file}
\gdef\@gtempa{[]}
\ifx\@gtempa\@currdir % VMS directory syntax
\gdef\import at path@fix#1{\@gobbleVMSbrack#1][>}
More information about the tex-live-commits
mailing list.