From 56868dd74576c285418c9d76bc3a5bab642fd6d8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 24 Apr 2016 22:07:49 +0000 Subject: currfile (24apr16) git-svn-id: svn://tug.org/texlive/trunk@40725 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/currfile/currfile.pdf | Bin 166674 -> 170278 bytes .../texmf-dist/source/latex/currfile/currfile.dtx | 23 ++++++++++++++++----- .../tex/latex/currfile/currfile-abspath.sty | 4 ++-- Master/texmf-dist/tex/latex/currfile/currfile.sty | 7 +++---- 4 files changed, 23 insertions(+), 11 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/currfile/currfile.pdf b/Master/texmf-dist/doc/latex/currfile/currfile.pdf index b943c90cc60..b214a245743 100644 Binary files a/Master/texmf-dist/doc/latex/currfile/currfile.pdf and b/Master/texmf-dist/doc/latex/currfile/currfile.pdf differ diff --git a/Master/texmf-dist/source/latex/currfile/currfile.dtx b/Master/texmf-dist/source/latex/currfile/currfile.dtx index 40041d304f8..de45aa88537 100644 --- a/Master/texmf-dist/source/latex/currfile/currfile.dtx +++ b/Master/texmf-dist/source/latex/currfile/currfile.dtx @@ -29,10 +29,10 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesFile{currfile.dtx}[% %<=*DATE> - 2013/02/01 + 2015/04/23 %<=/DATE> %<=*VERSION> - v0.7b + v0.7c %<=/VERSION> DTX file for currfile package] @@ -59,7 +59,7 @@ % % \fi % -% \CheckSum{1115} +% \CheckSum{1114} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -89,6 +89,7 @@ % \changes{v0.7}{2012/05/15}{Added support for parent file paths.} % \changes{v0.7a}{2012/10/28}{Fixed issue with \pkg{enumitem} package which redefines \cs{value}.} % \changes{v0.7b}{2013/02/01}{Support for \cs{\subinput*} etc.\ from the \pkg{import} package which requires a different path search order.} +% \changes{v0.7c}{2015/04/23}{Removed stack underflow warning if loaded by other package. Set default file name in this case to main file name.} % % \GetFileInfo{currfile.dtx} % @@ -110,6 +111,19 @@ % Optionally also the absolute location of current input file can be provided if a special compiler option is enabled. % \end{abstract} % +% \tableofcontents +% +% \section{Important notice} +% This package relies heavily on the package \pkg{filehook} by the same author and installs at-begin and at-end hooks for all files. +% The provided macros for the file names \emph{will only work for files loaded \emph{after} the package}. +% This means only for files which are getting opened afterwards and where not yet opened, as the at-begin hook is required to run. +% The macros will therefore not work correctly in a package which loaded \pkg{currfile}, but for all further loaded packages. +% +% The options \opt{abspath} and \opt{realmainfile} may be used to improve the behavior in such cases. +% +% However, it is simply recommended to load \pkg{currfile} as early as possible. It can even be loaded before the class using +% \Macro\RequirePackage{currfile}. +% % \section{Usage} % % \DescribeMacro{\currfiledir} @@ -631,7 +645,6 @@ \relax \global\advance\c@currfiledepth by\m@ne \else - \PackageWarning{currfile}{File stack underflow!}% \global\let\currfile@stack\currfile@stackinit \global\c@currfiledepth=\z@ \fi @@ -777,7 +790,6 @@ \let\currfileabsdir\@empty \newcounter{currfiledepth} \global\c@currfiledepth\m@ne -\currfile@push \ifcurrfile@realmainfile \getmainfile \ifx\themainfile\@empty @@ -788,6 +800,7 @@ \else \currfile@set{\currfile@maindir\jobname.\currfile@mainext} \fi +\currfile@push \let\currfile@stackinit\currfile@stack % \end{macrocode} % \end{macro} diff --git a/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty b/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty index df969069c26..3052f1cb03c 100644 --- a/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty +++ b/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty @@ -1,7 +1,7 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{currfile-abspath}[% - 2013/02/01 - v0.7b + 2015/04/23 + v0.7c Provides absolute file paths, the parent working directory and the main file name] \newcommand*\thepwd{} \newcommand*\theabspath{} diff --git a/Master/texmf-dist/tex/latex/currfile/currfile.sty b/Master/texmf-dist/tex/latex/currfile/currfile.sty index 904e57cd3cd..37755c4b8a1 100644 --- a/Master/texmf-dist/tex/latex/currfile/currfile.sty +++ b/Master/texmf-dist/tex/latex/currfile/currfile.sty @@ -1,7 +1,7 @@ \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{currfile}[% - 2013/02/01 - v0.7b + 2015/04/23 + v0.7c Provides the file path elements of the current input file] \RequirePackage{kvoptions} \SetupKeyvalOptions{family=currfile,prefix=currfile@} @@ -182,7 +182,6 @@ \relax \global\advance\c@currfiledepth by\m@ne \else - \PackageWarning{currfile}{File stack underflow!}% \global\let\currfile@stack\currfile@stackinit \global\c@currfiledepth=\z@ \fi @@ -289,7 +288,6 @@ \let\currfileabsdir\@empty \newcounter{currfiledepth} \global\c@currfiledepth\m@ne -\currfile@push \ifcurrfile@realmainfile \getmainfile \ifx\themainfile\@empty @@ -300,6 +298,7 @@ \else \currfile@set{\currfile@maindir\jobname.\currfile@mainext} \fi +\currfile@push \let\currfile@stackinit\currfile@stack \let\currfile@abspathfalse\relax \let\currfile@abspathtrue\relax -- cgit v1.2.3