| 1 |
%% |
| 2 |
%% This is file `expl3.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% expl3.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% Copyright (C) 1990-2026 The LaTeX Project |
| 10 |
%% |
| 11 |
%% It may be distributed and/or modified under the conditions of |
| 12 |
%% the LaTeX Project Public License (LPPL), either version 1.3c of |
| 13 |
%% this license or (at your option) any later version. The latest |
| 14 |
%% version of this license is in the file: |
| 15 |
%% |
| 16 |
%% https://www.latex-project.org/lppl.txt |
| 17 |
%% |
| 18 |
%% This file is part of the "l3kernel bundle" (The Work in LPPL) |
| 19 |
%% and all files in that bundle must be distributed together. |
| 20 |
%% |
| 21 |
%% File: expl3.dtx |
| 22 |
\def\ExplFileDate{2026-05-15}% |
| 23 |
\let\ExplLoaderFileDate\ExplFileDate |
| 24 |
\ProvidesPackage{expl3} |
| 25 |
[% |
| 26 |
\ExplFileDate\space |
| 27 |
L3 programming layer (loader) |
| 28 |
]% |
| 29 |
\protected\def\ProvidesExplPackage |
| 30 |
{\@expl@provides@file@@Nnnnnn\ProvidesPackage{Package}} |
| 31 |
\protected\def\ProvidesExplClass |
| 32 |
{\@expl@provides@file@@Nnnnnn\ProvidesClass{Document Class}} |
| 33 |
\protected\def\ProvidesExplFile |
| 34 |
{\@expl@provides@file@@Nnnnnn\ProvidesFile{File}} |
| 35 |
\protected\long\def\@expl@provides@file@@Nnnnnn#1#2#3#4#5#6% |
| 36 |
{% |
| 37 |
\ifnum0% |
| 38 |
\ifdefined#11\fi |
| 39 |
\ifx\relax#1\else1\fi |
| 40 |
=11 |
| 41 |
\expandafter#1% |
| 42 |
\else |
| 43 |
\@expl@provides@generic@@wnnw{#2}% |
| 44 |
\fi |
| 45 |
{#3}[{#4 \ifx\relax#5\relax\else\@expl@provides@file@@N#5\space\fi #6}]% |
| 46 |
\ExplSyntaxOn |
| 47 |
} |
| 48 |
\long\def\@expl@provides@file@@N#1{v\if#1v\else#1\fi} |
| 49 |
\protected\long\def\@expl@provides@generic@@wnnw#1\fi#2[#3]% |
| 50 |
{% |
| 51 |
\immediate\write-1{#1: #2 #3}% |
| 52 |
} |
| 53 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 54 |
\expandafter\ifx\csname tex\string _let:D\endcsname\relax |
| 55 |
\expandafter\@firstofone |
| 56 |
\else |
| 57 |
\expandafter\@gobble |
| 58 |
\fi |
| 59 |
{\input expl3-code.tex }% |
| 60 |
\begingroup\expandafter\expandafter\expandafter\endgroup |
| 61 |
\expandafter\ifx\csname tex\string _let:D\endcsname\relax |
| 62 |
\expandafter\endinput |
| 63 |
\fi |
| 64 |
\ifcsname\detokenize{c__kernel_expl_date_tl}\endcsname |
| 65 |
\expandafter\@firstofone |
| 66 |
\else |
| 67 |
\ifodd\csname\detokenize{l__kernel_expl_bool}\endcsname |
| 68 |
\global\expandafter\let\csname\detokenize |
| 69 |
{c__kernel_expl_date_tl}\endcsname\ExplLoaderFileDate |
| 70 |
\expandafter\expandafter |
| 71 |
\expandafter\@gobble |
| 72 |
\else |
| 73 |
\expandafter\expandafter |
| 74 |
\expandafter\@firstofone |
| 75 |
\fi |
| 76 |
\fi |
| 77 |
{\csname\detokenize{__kernel_dependency_version_check:Nn}\endcsname |
| 78 |
\ExplLoaderFileDate{expl3.sty}}% |
| 79 |
\ifcsname\detokenize{g__expl_reload_bool}\endcsname |
| 80 |
\ExplSyntaxOn |
| 81 |
\bool_gset_true:N \g__expl_reload_bool |
| 82 |
\else |
| 83 |
\bool_new:N \g__expl_reload_bool |
| 84 |
\fi |
| 85 |
\tl_if_exist:NF \c__expl_def_ext_tl |
| 86 |
{ \tl_const:Nn \c__expl_def_ext_tl { def } } |
| 87 |
\cs_gset_protected:Npn \__kernel_sys_configuration_load:n #1 |
| 88 |
{ |
| 89 |
\ExplSyntaxOff |
| 90 |
\cs_undefine:c { ver@ #1 .def } |
| 91 |
\@onefilewithoptions {#1} [ ] [ ] |
| 92 |
\c__expl_def_ext_tl |
| 93 |
\ExplSyntaxOn |
| 94 |
} |
| 95 |
\cs_gset_protected:Npn \__kernel_sys_configuration_load_std:n #1 |
| 96 |
{ |
| 97 |
\cs_undefine:c { ver@ #1 .def } |
| 98 |
\@onefilewithoptions {#1} [ ] [ ] |
| 99 |
\c__expl_def_ext_tl |
| 100 |
} |
| 101 |
\clist_if_exist:NF \l__expl_options_clist |
| 102 |
{ \clist_new:N \l__expl_options_clist } |
| 103 |
\DeclareOption* |
| 104 |
{ \clist_put_right:NV \l__expl_options_clist \CurrentOption } |
| 105 |
\ProcessOptions \relax |
| 106 |
\keys_define:nn { sys } |
| 107 |
{ |
| 108 |
backend .choices:nn = |
| 109 |
{ dvipdfmx , dvips , dvisvgm , luatex , pdftex , pdfmode , xdvipdfmx , xetex } |
| 110 |
{ \sys_load_backend:n {#1} } , |
| 111 |
check-declarations .choice: , |
| 112 |
check-declarations / true .code:n = |
| 113 |
{ \debug_on:n { check-declarations } } , |
| 114 |
check-declarations / false .code:n = |
| 115 |
{ |
| 116 |
\__kernel_if_debug:TF |
| 117 |
{ \debug_off:n { check-declarations } } |
| 118 |
{ } |
| 119 |
} , |
| 120 |
check-declarations .default:n = true , |
| 121 |
driver .meta:n = { backend = #1 } , |
| 122 |
enable-debug .code:n = {} , % A stub |
| 123 |
log-functions .choice: , |
| 124 |
log-functions / true .code:n = |
| 125 |
{ \debug_on:n { log-functions } } , |
| 126 |
log-functions / false .code:n = |
| 127 |
{ |
| 128 |
\__kernel_if_debug:TF |
| 129 |
{ \debug_off:n { log-functions } } |
| 130 |
{ } |
| 131 |
} , |
| 132 |
log-functions .default:n = true , |
| 133 |
suppress-backend-headers .bool_gset_inverse:N |
| 134 |
= \g__kernel_backend_header_bool , |
| 135 |
suppress-backend-headers .initial:n = false , |
| 136 |
undo-recent-deprecations .code:n = {} % A stub |
| 137 |
} |
| 138 |
\cs_if_exist:NF \@expl@sys@load@backend@@ |
| 139 |
{ |
| 140 |
\tl_put_left:Nn \document |
| 141 |
{ |
| 142 |
\endgroup |
| 143 |
\@expl@sys@load@backend@@ |
| 144 |
\begingroup |
| 145 |
} |
| 146 |
} |
| 147 |
\cs_gset_protected:Npn \@expl@sys@load@backend@@ |
| 148 |
{ |
| 149 |
\str_if_exist:NF \c_sys_backend_str |
| 150 |
{ \sys_load_backend:n { } } |
| 151 |
} |
| 152 |
\keys_set:nV { sys } \l__expl_options_clist |
| 153 |
\str_if_exist:NF \c_sys_backend_str |
| 154 |
{ \sys_load_backend:n { } } |
| 155 |
\bool_if:NT \g__expl_reload_bool |
| 156 |
{ |
| 157 |
\cs_gset_eq:NN \__kernel_sys_configuration_load:n |
| 158 |
\__kernel_sys_configuration_load_std:n |
| 159 |
\ExplSyntaxOff |
| 160 |
\file_input_stop: |
| 161 |
} |
| 162 |
\cs_if_free:cTF { [email protected] } |
| 163 |
{ |
| 164 |
\tex_everyjob:D \exp_after:wN |
| 165 |
{ |
| 166 |
\tex_the:D \tex_everyjob:D |
| 167 |
\__kernel_sys_everyjob: |
| 168 |
} |
| 169 |
} |
| 170 |
{ \__kernel_sys_everyjob: } |
| 171 |
\reverse_if:N \if_cs_exist:N \s__expl_stop |
| 172 |
\scan_new:N \s__expl_stop |
| 173 |
\fi: |
| 174 |
\cs_if_exist:NF \@expl@push@filename@@ |
| 175 |
{ |
| 176 |
\tl_put_left:Nn \@pushfilename { \@expl@push@filename@@ } |
| 177 |
\tl_put_right:Nn \@pushfilename { \@expl@push@filename@aux@@ } |
| 178 |
} |
| 179 |
\cs_gset_protected:Npn \@expl@push@filename@@ |
| 180 |
{ |
| 181 |
\exp_args:Ne \__kernel_file_input_push:n |
| 182 |
{ |
| 183 |
\tl_to_str:N \@currname . |
| 184 |
\tl_to_str:N \@currext |
| 185 |
} |
| 186 |
\tl_put_left:Ne \l__expl_status_stack_tl |
| 187 |
{ |
| 188 |
\bool_if:NTF \l__kernel_expl_bool |
| 189 |
{ 1 } |
| 190 |
{ 0 } |
| 191 |
} |
| 192 |
\ExplSyntaxOff |
| 193 |
} |
| 194 |
\cs_gset_protected:Npn \@expl@push@filename@aux@@ #1#2#3 |
| 195 |
{ |
| 196 |
\str_gset:Nn \g_file_curr_name_str {#3} |
| 197 |
#1 #2 {#3} |
| 198 |
} |
| 199 |
\cs_if_exist:NF \@expl@pop@filename@@ |
| 200 |
{ |
| 201 |
\tl_put_right:Nn \@popfilename |
| 202 |
{ \@expl@pop@filename@@ } |
| 203 |
} |
| 204 |
\cs_gset_protected:Npn \@expl@pop@filename@@ |
| 205 |
{ |
| 206 |
\__kernel_file_input_pop: |
| 207 |
\tl_if_empty:NTF \l__expl_status_stack_tl |
| 208 |
{ \ExplSyntaxOff } |
| 209 |
{ \exp_after:wN \__expl_status_pop:w \l__expl_status_stack_tl \s__expl_stop } |
| 210 |
} |
| 211 |
\cs_gset_protected:Npn \__expl_status_pop:w #1#2 \s__expl_stop |
| 212 |
{ |
| 213 |
\tl_set:Nn \l__expl_status_stack_tl {#2} |
| 214 |
\int_if_odd:nTF {#1} |
| 215 |
{ \ExplSyntaxOn } |
| 216 |
{ \ExplSyntaxOff } |
| 217 |
} |
| 218 |
\tl_if_exist:NF \l__expl_status_stack_tl |
| 219 |
{ |
| 220 |
\tl_new:N \l__expl_status_stack_tl |
| 221 |
\tl_set:Nn \l__expl_status_stack_tl { 0 } |
| 222 |
} |
| 223 |
\cs_gset_eq:NN \__kernel_sys_configuration_load:n |
| 224 |
\__kernel_sys_configuration_load_std:n |
| 225 |
%% |
| 226 |
%% |
| 227 |
%% End of file `expl3.sty'. |