[latex3-commits] [git/LaTeX3-latex3-latex3] LaTeX2020: Set \c_sys_jobname_str properly when preloading (a1124b7c0)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Oct 4 22:35:15 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : LaTeX2020
Link : https://github.com/latex3/latex3/commit/a1124b7c066daac901b406af5496d1c737db17a3
>---------------------------------------------------------------
commit a1124b7c066daac901b406af5496d1c737db17a3
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Oct 4 20:43:18 2019 +0100
Set \c_sys_jobname_str properly when preloading
>---------------------------------------------------------------
a1124b7c066daac901b406af5496d1c737db17a3
l3kernel/l3sys.dtx | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/l3kernel/l3sys.dtx b/l3kernel/l3sys.dtx
index 73d4e787f..0b9418a14 100644
--- a/l3kernel/l3sys.dtx
+++ b/l3kernel/l3sys.dtx
@@ -295,18 +295,23 @@
% \begin{variable}{\c_sys_jobname_str}
% Inherited from the \LaTeX3 name for the primitive: this needs to
% actually contain the text of the job name rather than the name of
-% the primitive, of course.
+% the primitive, of course. In package mode, there are two possibilies:
+% we might be pre-loading, or we might be loading after pre-loading.
% \begin{macrocode}
%<*initex>
-\tex_everyjob:D \exp_after:wN
- {
- \tex_the:D \tex_everyjob:D
- \str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
- }
+\use:n
%</initex>
%<*package>
-\str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
+\cs_if_exist:cTF { ver at expl3.sty }
+ { \str_const:Nx \c_sys_jobname_str { \tex_jobname:D } }
%</package>
+ {
+ \tex_everyjob:D \exp_after:wN
+ {
+ \tex_the:D \tex_everyjob:D
+ \str_const:Nx \c_sys_jobname_str { \tex_jobname:D }
+ }
+ }
% \end{macrocode}
% \end{variable}
%
More information about the latex3-commits
mailing list