diff options
author | Karl Berry <karl@freefriends.org> | 2024-03-15 21:23:53 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-03-15 21:23:53 +0000 |
commit | 9c207cc450a93cc3c9a8ef71b3d5f2d9aac5c263 (patch) | |
tree | f2d991cbe9f6b0014f044a2b2d000058a373adbe /Master | |
parent | f07458c32b8d58ab1e6fec2500fef7ca7ebfdbba (diff) |
currfile (15mar24)
git-svn-id: svn://tug.org/texlive/trunk@70650 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/currfile/README | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/currfile/README.txt | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/currfile/currfile.pdf | bin | 182606 -> 182848 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/currfile/currfile.dtx | 38 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/currfile/currfile.sty | 26 |
6 files changed, 72 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/latex/currfile/README b/Master/texmf-dist/doc/latex/currfile/README deleted file mode 100644 index 26eb70dd626..00000000000 --- a/Master/texmf-dist/doc/latex/currfile/README +++ /dev/null @@ -1,9 +0,0 @@ -LaTeX package 'currfile' -~~~~~~~~~~~~~~~~~~~~~~~~ -Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@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. - diff --git a/Master/texmf-dist/doc/latex/currfile/README.txt b/Master/texmf-dist/doc/latex/currfile/README.txt new file mode 100644 index 00000000000..daa2fe60ff6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/currfile/README.txt @@ -0,0 +1,19 @@ +LaTeX package 'currfile' +======================== + +Copyright (c) 2010-2024 by Martin Scharrer <martin.scharrer@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). + diff --git a/Master/texmf-dist/doc/latex/currfile/currfile.pdf b/Master/texmf-dist/doc/latex/currfile/currfile.pdf Binary files differindex 21c3c7f4b22..1d7ec3f6ed6 100644 --- a/Master/texmf-dist/doc/latex/currfile/currfile.pdf +++ b/Master/texmf-dist/doc/latex/currfile/currfile.pdf diff --git a/Master/texmf-dist/source/latex/currfile/currfile.dtx b/Master/texmf-dist/source/latex/currfile/currfile.dtx index 539c8dc728f..991d1417c3f 100644 --- a/Master/texmf-dist/source/latex/currfile/currfile.dtx +++ b/Master/texmf-dist/source/latex/currfile/currfile.dtx @@ -1,7 +1,7 @@ % \iffalse meta-comment %<=*COPYRIGHT> %% -%% Copyright (c) 2010-2022 by Martin Scharrer <martin.scharrer@web.de> +%% Copyright (c) 2010-2024 by Martin Scharrer <martin.scharrer@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@mainext\relax +}{}% +% \end{macrocode} +% +% \begin{macrocode} \@ifpackageloaded{fink}{% \DeclareStringOption[\fnk@mainext]{mainext}% \DeclareStringOption[\fnk@maindir]{maindir}% @@ -436,13 +445,28 @@ \currfile@realmainfilefalse \fi \fi - +% \end{macrocode} +% +% \begin{macrocode} +\begingroup +\@tempswafalse \ifcurrfile@abspath - \RequirePackage{currfile-abspath} + \@tempswatrue \else \ifcurrfile@realmainfile - \RequirePackage{currfile-abspath} + \@tempswatrue \fi\fi + +\if@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} +\else + \endgroup +\fi % \end{macrocode} % % diff --git a/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty b/Master/texmf-dist/tex/latex/currfile/currfile-abspath.sty index 2b896d34a81..43840c49f36 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}[% - 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{} diff --git a/Master/texmf-dist/tex/latex/currfile/currfile.sty b/Master/texmf-dist/tex/latex/currfile/currfile.sty index 2d2b67f8004..328496618db 100644 --- a/Master/texmf-dist/tex/latex/currfile/currfile.sty +++ b/Master/texmf-dist/tex/latex/currfile/currfile.sty @@ -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@mainext\relax +}{}% \@ifpackageloaded{fink}{% \DeclareStringOption[\fnk@mainext]{mainext}% \DeclareStringOption[\fnk@maindir]{maindir}% @@ -44,13 +46,25 @@ \currfile@realmainfilefalse \fi \fi - +\begingroup +\@tempswafalse \ifcurrfile@abspath - \RequirePackage{currfile-abspath} + \@tempswatrue \else \ifcurrfile@realmainfile - \RequirePackage{currfile-abspath} + \@tempswatrue \fi\fi + +\if@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} +\else + \endgroup +\fi \filehook@prefixwarg\filehook@every@atbegin{% \currfile@push \currfile@set{#1}% |