[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh422: Do not drop path in replacement file name (4b2ed6b4)

PhelypeOleinik phelype.oleinik at latex-project.org
Fri Nov 20 03:01:09 CET 2020


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh422
Link       : https://github.com/latex3/latex2e/commit/4b2ed6b4035a39ba3621c017a15c248a459314b7

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

commit 4b2ed6b4035a39ba3621c017a15c248a459314b7
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Nov 19 23:01:09 2020 -0300

    Do not drop path in replacement file name


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

4b2ed6b4035a39ba3621c017a15c248a459314b7
 base/ltfilehook.dtx | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 95f8e14d..50f6785c 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -796,8 +796,8 @@
 %
 %
 % \begin{macro}{\@@_subst_add:nn,\@@_subst_remove:n,
-%               \@@_subst_file_normalize:n,\@@_subst_empty_name_chk:NN}
-%   \cs{@@_substitution_lthooadd:nn} declares a file substitution by
+%               \@@_subst_file_normalize:Nn,\@@_subst_empty_name_chk:NN}
+%   \cs{@@_subst_add:nn} declares a file substitution by
 %   doing a (global) definition of the form
 %   |\def|\cs{@file-subst@\meta{file}}|{|\meta{replacement}|}|.
 %   The file names are properly sanitised, and normalized with the same
@@ -811,8 +811,12 @@
     \group_begin:
       \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
       \int_set:Nn \tex_escapechar:D { -1 }
-      \cs_gset:cpx { @file-subst@ \@@_subst_file_normalize:n {#1} }
-        { \@@_subst_file_normalize:n {#2} }
+      \cs_gset:cpx
+        {
+          @file-subst@
+          \@@_subst_file_normalize:Nn \use_ii_iii:nnn {#1}
+        }
+        { \@@_subst_file_normalize:Nn \@@_file_name_compose:nnn {#2} }
     \group_end:
   }
 \cs_new_protected:Npn \@@_subst_remove:n #1
@@ -820,14 +824,18 @@
     \group_begin:
       \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
       \int_set:Nn \tex_escapechar:D { -1 }
-      \cs_undefine:c { @file-subst@ \@@_subst_file_normalize:n {#1} }
+      \cs_undefine:c
+        {
+          @file-subst@
+          \@@_subst_file_normalize:Nn \use_ii_iii:nnn {#1}
+        }
     \group_end:
   }
-\cs_new:Npn \@@_subst_file_normalize:n #1
+\cs_new:Npn \@@_subst_file_normalize:Nn #1 #2
   {
     \exp_after:wN \@@_subst_empty_name_chk:NN
       \cs:w \exp_after:wN \cs_end:
-        \cs:w \@@_file_parse_full_name:nN {#1} \use_ii_iii:nnn \cs_end:
+        \cs:w \@@_file_parse_full_name:nN {#2} #1 \cs_end:
   }
 \cs_new:Npn \@@_subst_empty_name_chk:NN #1 #2
   { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: }





More information about the latex3-commits mailing list.