diff options
Diffstat (limited to 'macros/latex/contrib/currfile/currfile.dtx')
-rw-r--r-- | macros/latex/contrib/currfile/currfile.dtx | 38 |
1 files changed, 31 insertions, 7 deletions
diff --git a/macros/latex/contrib/currfile/currfile.dtx b/macros/latex/contrib/currfile/currfile.dtx index 539c8dc728..991d1417c3 100644 --- a/macros/latex/contrib/currfile/currfile.dtx +++ b/macros/latex/contrib/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} % % |