From 9c207cc450a93cc3c9a8ef71b3d5f2d9aac5c263 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 15 Mar 2024 21:23:53 +0000 Subject: currfile (15mar24) git-svn-id: svn://tug.org/texlive/trunk@70650 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/source/latex/currfile/currfile.dtx | 38 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'Master/texmf-dist/source') 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 +%% Copyright (c) 2010-2024 by Martin Scharrer %% ---------------------------------------------------------------------- %% %% 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} % % -- cgit v1.2.3