[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh422: Report when a package is loaded with an explicit path (06c2915d)

PhelypeOleinik phelype.oleinik at latex-project.org
Sat Nov 21 01:35:51 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh422
Link       : https://github.com/latex3/latex2e/commit/06c2915dd12e8e83e116d81ade55251842790953

>---------------------------------------------------------------

commit 06c2915dd12e8e83e116d81ade55251842790953
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Fri Nov 20 21:35:51 2020 -0300

    Report when a package is loaded with an explicit path


>---------------------------------------------------------------

06c2915dd12e8e83e116d81ade55251842790953
 base/ltclass.dtx               | 8 ++++++--
 base/testfiles/github-0422.tlg | 4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/base/ltclass.dtx b/base/ltclass.dtx
index 7c1a66f5..56073206 100644
--- a/base/ltclass.dtx
+++ b/base/ltclass.dtx
@@ -988,10 +988,14 @@
 %    \end{macrocode}
 % \changes{v1.3u}{2020/11/07}
 %         {Use string comparison instead of \cs{ifx}}
+%   Here \cs{@currpath} is explicitly added to the file name to report
+%   when a package or class is loaded using an explicit path.  Loading
+%   using a path in the argument is supported but not encouraged.
 %    \begin{macrocode}
-  \@expandtwoargs\@expl at str@if at eq@@nnTF{\@gtempa}{\@currname}{}{%
+  \@expandtwoargs\@expl at str@if at eq@@nnTF
+      {\@gtempa}{\@currpath\@currname}{}{%
     \@latex at warning@no at line{You have requested
-      \@cls at pkg\space`\@currname',\MessageBreak
+      \@cls at pkg\space`\@currpath\@currname',\MessageBreak
        but the \@cls at pkg\space provides `#1'}%
     }%
   \@ifnextchar[\@pr at videpackage{\@pr at videpackage[]}}%]
diff --git a/base/testfiles/github-0422.tlg b/base/testfiles/github-0422.tlg
index e9746366..b3f3b6e6 100644
--- a/base/testfiles/github-0422.tlg
+++ b/base/testfiles/github-0422.tlg
@@ -2,6 +2,8 @@ This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
 ==================================================
 (testpath/teststy.sty
+LaTeX Warning: You have requested package `testpath/teststy',
+               but the package provides `teststy'.
 Package: teststy 
 (teststy) with 'opt'
 )
@@ -69,6 +71,8 @@ to your \documentclass declaration may fix this.
 Try typing  <return>  to proceed.
 ==================================================
 (testpath/in-fixed.sty
+LaTeX Warning: You have requested package `testpath/in-fixed',
+               but the package provides `in-fixed'.
 Package: in-fixed 
 (in-fixed) with 'opt'
 (inpath): I should be loaded instead.





More information about the latex3-commits mailing list.