texlive[70650] Master/texmf-dist: currfile (15mar24)
commits+karl at tug.org
commits+karl at tug.org
Fri Mar 15 22:23:53 CET 2024
Revision: 70650
https://tug.org/svn/texlive?view=revision&revision=70650
Author: karl
Date: 2024-03-15 22:23:53 +0100 (Fri, 15 Mar 2024)
Log Message:
-----------
currfile (15mar24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/currfile/currfile.pdf
trunk/Master/texmf-dist/source/latex/currfile/currfile.dtx
trunk/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty
trunk/Master/texmf-dist/tex/latex/currfile/currfile.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/currfile/README.txt
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/latex/currfile/README
Deleted: trunk/Master/texmf-dist/doc/latex/currfile/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/currfile/README 2024-03-15 21:23:39 UTC (rev 70649)
+++ trunk/Master/texmf-dist/doc/latex/currfile/README 2024-03-15 21:23:53 UTC (rev 70650)
@@ -1,9 +0,0 @@
-LaTeX package 'currfile'
-~~~~~~~~~~~~~~~~~~~~~~~~
-Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer at web.de>
-Repository: https://github.com/MartinScharrer/currfile
-Issues: https://github.com/MartinScharrer/currfile/issues
-
-Provides macros holding the file name information (dir, base name, extension, full name and full path) for
-files read by LaTeX's \input and \include macros.
-
Added: trunk/Master/texmf-dist/doc/latex/currfile/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/currfile/README.txt (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/currfile/README.txt 2024-03-15 21:23:53 UTC (rev 70650)
@@ -0,0 +1,19 @@
+LaTeX package 'currfile'
+========================
+
+Copyright (c) 2010-2024 by Martin Scharrer <martin.scharrer at web.de>
+License: LaTeX Project Public License, v1.3c or later: http://www.latex-project.org/lppl.txt
+Repository: https://github.com/MartinScharrer/currfile
+Issues: https://github.com/MartinScharrer/currfile/issues
+
+Provides macros holding the file name information (dir, base name, extension, full name and full path) for files read by
+LaTeX's \input and \include macros.
+
+The package provides macros holding file name information (directory, base name, extension, full name and full path) for
+files read by LaTeX \input and \include macros; it uses the file hooks provided by the author's filehook. In
+particular, it restores the parent file name after the trailing \clearpage of an \included file; as a result, the macros
+may be usefully employed in the page header and footer of the last printed page of such a file.
+
+The depth of inclusion is made available, together with the "parent" (including file) and "parents" (all including files
+to the root of the tree).
+
Property changes on: trunk/Master/texmf-dist/doc/latex/currfile/README.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/currfile/currfile.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/currfile/currfile.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/currfile/currfile.dtx 2024-03-15 21:23:39 UTC (rev 70649)
+++ trunk/Master/texmf-dist/source/latex/currfile/currfile.dtx 2024-03-15 21:23:53 UTC (rev 70650)
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%<=*COPYRIGHT>
%%
-%% Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer at web.de>
+%% Copyright (c) 2010-2024 by Martin Scharrer <martin.scharrer at web.de>
%% ----------------------------------------------------------------------
%%
%% This work may be distributed and/or modified under the
@@ -29,10 +29,10 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesFile{currfile.dtx}[%
%<=*DATE>
- 2022/10/10
+ 2024/03/14
%<=/DATE>
%<=*VERSION>
- v0.8
+ v1.0
%<=/VERSION>
DTX file for currfile package]
@@ -393,7 +393,16 @@
% \begin{macrocode}
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=currfile,prefix=currfile@}
-
+% \end{macrocode}
+%
+% Handle already loaded \pkg{currfile-abspath} package.
+% \begin{macrocode}
+\@ifpackageloaded{currfile-abspath}{%
+ \let\currfile at mainext\relax
+}{}%
+% \end{macrocode}
+%
+% \begin{macrocode}
\@ifpackageloaded{fink}{%
\DeclareStringOption[\fnk at mainext]{mainext}%
\DeclareStringOption[\fnk at maindir]{maindir}%
@@ -436,13 +445,28 @@
\currfile at realmainfilefalse
\fi
\fi
-
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+\@tempswafalse
\ifcurrfile at abspath
- \RequirePackage{currfile-abspath}
+ \@tempswatrue
\else
\ifcurrfile at realmainfile
+ \@tempswatrue
+\fi\fi
+
+\if at tempswa
+ \endgroup
+ \@ifpackageloaded{currfile-abspath}{%
+ \PackageWarning{currfile}{Sub-package 'currfile-abspath' already loaded beforehand.
+ This might lead to wrong results when non-default options are used.}%
+ }{}%
\RequirePackage{currfile-abspath}
-\fi\fi
+\else
+ \endgroup
+\fi
% \end{macrocode}
%
%
Modified: trunk/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty 2024-03-15 21:23:39 UTC (rev 70649)
+++ trunk/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty 2024-03-15 21:23:53 UTC (rev 70650)
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{currfile-abspath}[%
- 2022/10/10
- v0.8
+ 2024/03/14
+ v1.0
Provides absolute file paths, the parent working directory and the main file name]
\newcommand*\thepwd{}
\newcommand*\theabspath{}
Modified: trunk/Master/texmf-dist/tex/latex/currfile/currfile.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/currfile/currfile.sty 2024-03-15 21:23:39 UTC (rev 70649)
+++ trunk/Master/texmf-dist/tex/latex/currfile/currfile.sty 2024-03-15 21:23:53 UTC (rev 70650)
@@ -1,11 +1,13 @@
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{currfile}[%
- 2022/10/10
- v0.8
+ 2024/03/14
+ v1.0
Provides the file path elements of the current input file]
\RequirePackage{kvoptions}
\SetupKeyvalOptions{family=currfile,prefix=currfile@}
-
+\@ifpackageloaded{currfile-abspath}{%
+ \let\currfile at mainext\relax
+}{}%
\@ifpackageloaded{fink}{%
\DeclareStringOption[\fnk at mainext]{mainext}%
\DeclareStringOption[\fnk at maindir]{maindir}%
@@ -44,13 +46,25 @@
\currfile at realmainfilefalse
\fi
\fi
-
+\begingroup
+\@tempswafalse
\ifcurrfile at abspath
- \RequirePackage{currfile-abspath}
+ \@tempswatrue
\else
\ifcurrfile at realmainfile
+ \@tempswatrue
+\fi\fi
+
+\if at tempswa
+ \endgroup
+ \@ifpackageloaded{currfile-abspath}{%
+ \PackageWarning{currfile}{Sub-package 'currfile-abspath' already loaded beforehand.
+ This might lead to wrong results when non-default options are used.}%
+ }{}%
\RequirePackage{currfile-abspath}
-\fi\fi
+\else
+ \endgroup
+\fi
\filehook at prefixwarg\filehook at every@atbegin{%
\currfile at push
\currfile at set{#1}%
More information about the tex-live-commits
mailing list.