summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3.sty')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/expl3.sty261
1 files changed, 38 insertions, 223 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
index 07037ec2df5..0a6c87b5cd0 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty
@@ -19,47 +19,13 @@
%% and all files in that bundle must be distributed together.
%%
%% File: expl3.dtx
-\def\ExplFileDate{2019-09-19}%
+\def\ExplFileDate{2019-09-28}%
\let\ExplLoaderFileDate\ExplFileDate
\ProvidesPackage{expl3}
[%
\ExplFileDate\space
L3 programming layer (loader)
]%
-\newcommand\expl@create@bool@option[2]%
- {%
- \DeclareOption{#1}{\chardef #2=1 }%
- \DeclareOption{#1=true}{\chardef #2=1 }%
- \DeclareOption{#1=false}{\chardef #2=0 }%
- \newcommand*#2{}%
- \chardef #2=0 %
- }%
-\expl@create@bool@option
- {undo-recent-deprecations}\l@expl@undo@recent@deprecations@bool
-\expl@create@bool@option{check-declarations}\l@expl@check@declarations@bool
-\expl@create@bool@option{log-functions}\l@expl@log@functions@bool
-\expl@create@bool@option{enable-debug}\l@expl@enable@debug@bool
-\let\expl@create@bool@option\@undefined
-\chardef\l@expl@enable@debug@bool=0 %
-\newcommand*\l@expl@options@clist{}%
-\DeclareOption*
- {%
- \ifx\l@expl@options@clist\@empty
- \let\l@expl@options@clist\CurrentOption
- \else
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter\l@expl@options@clist
- \expandafter\expandafter\expandafter
- {\expandafter\l@expl@options@clist\expandafter,\CurrentOption}
- \fi
- }%
-\ProcessOptions\relax
-\ifodd\l@expl@check@declarations@bool
- \chardef\l@expl@enable@debug@bool=1 %
-\fi
-\ifodd\l@expl@log@functions@bool
- \chardef\l@expl@enable@debug@bool=1 %
-\fi
\protected\def\ProvidesExplPackage#1#2#3#4%
{%
\ProvidesPackage{#1}[#2 \ifx\relax#3\relax\else v#3\space\fi #4]%
@@ -80,190 +46,8 @@
\expandafter\ifx\csname tex\string _let:D\endcsname\relax
\expandafter\endinput
\fi
-\__kernel_msg_new:nnnn { expl } { wrong-driver }
- { Driver~request~inconsistent~with~engine:~using~'#2'~driver. }
- {
- You~have~requested~driver~'#1',~but~this~is~not~suitable~for~use~with~the~
- active~engine.~LaTeX3~will~use~the~'#2'~driver~instead.
- }
-\tl_new:N \l__expl_driver_tl
-\keys_define:nn { expl }
- {
- driver .choice:,
- driver / auto .code:n =
- {
- \tl_set:Nx \l__expl_driver_tl
- {
- \sys_if_engine_xetex:TF
- { xdvipdfmx }
- {
- \sys_if_output_pdf:TF
- { pdfmode }
- {
- \bool_lazy_or:nnTF
- { \sys_if_engine_pdftex_p: }
- { \sys_if_engine_luatex_p: }
- { dvips }
- { dvipdfmx }
- }
- }
- }
- },
- driver / dvipdfmx .code:n =
- {
- \tl_set:Nn \l__expl_driver_tl { dvipdfmx }
- \sys_if_engine_xetex:TF
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { dvipdfmx } { xdvipdfmx }
- \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
- }
- {
- \sys_if_output_pdf:T
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { dvipdfmx } { pdfmode }
- \tl_set:Nn \l__expl_driver_tl { pdfmode }
- }
- }
- },
- driver / dvips .code:n =
- {
- \tl_set:Nn \l__expl_driver_tl { dvips }
- \sys_if_engine_xetex:TF
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { dvips } { xdvipdfmx }
- \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
- }
- {
- \sys_if_output_pdf:T
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { dvips } { pdfmode }
- \tl_set:Nn \l__expl_driver_tl { pdfmode }
- }
- }
- },
- driver / dvisvgm .code:n =
- {
- \tl_set:Nn \l__expl_driver_tl { dvisvgm }
- \sys_if_engine_xetex:TF
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { dvips } { xdvipdfmx }
- \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
- }
- {
- \sys_if_output_pdf:T
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { dvips } { pdfmode }
- \tl_set:Nn \l__expl_driver_tl { pdfmode }
- }
- }
- },
- driver / latex2e .code:n =
- { \tl_set:Nn \l__expl_driver_tl { latex2e } },
- driver / pdfmode .code:n =
- {
- \tl_set:Nn \l__expl_driver_tl { pdfmode }
- \sys_if_engine_xetex:TF
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { pdfmode } { xdvipdfmx }
- \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
- }
- {
- \sys_if_output_pdf:F
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { pdfmode } { dvips }
- \tl_set:Nn \l__expl_driver_tl { dvips }
- }
- }
- },
- driver / xdvipdfmx .code:n =
- {
- \tl_set:Nn \l__expl_driver_tl { xdvipdfmx }
- \sys_if_engine_xetex:F
- {
- \sys_if_output_pdf:TF
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { xdvipdfmx } { pdfmode }
- \tl_set:Nn \l__expl_driver_tl { pdfmode }
- }
- {
- \__kernel_msg_error:nnnn { expl } { wrong-driver }
- { xdvipdfmx } { dvips }
- \tl_set:Nn \l__expl_driver_tl { dvips }
- }
- }
- },
- driver .initial:n = { auto } ,
- native-drivers .choice:,
- native-drivers .default:n = { true },
- native-drivers / false .meta:n = { driver = latex2e },
- native-drivers / true .meta:n = { driver = auto }
- }
-\keys_define:nn { expl }
- {
- undo-recent-deprecations .bool_set:N = \l@expl@undo@recent@deprecations@bool,
- check-declarations .bool_set:N = \l@expl@check@declarations@bool,
- log-functions .bool_set:N = \l@expl@log@functions@bool
- }
-\keys_set:nV { expl } \l@expl@options@clist
-\str_if_eq:VnTF \l__expl_driver_tl { latex2e }
- {
- \tl_gput_left:Nn \@begindocumenthook { \RequirePackage { graphics } }
- \__kernel_msg_new:nnnn { box } { clipping-not-available }
- { Box~clipping~not~available. }
- {
- The~\box_clip:N~function~is~only~available~when~loading~expl3~
- with~the~"native-drivers"~option.
- }
- \cs_set_protected:Npn \box_clip:N #1
- {
- \hbox_set:Nn #1 { \box_use:N #1 }
- \__kernel_msg_error:nn { box } { clipping-not-available }
- }
- \cs_set_protected:Npn \box_rotate:Nn #1#2
- { \hbox_set:Nn #1 { \rotatebox {#2} { \box_use:N #1 } } }
- \cs_set_protected:Npn \box_resize_to_wd_and_ht_plus_dp:Nnn #1#2#3
- {
- \hbox_set:Nn #1
- {
- \resizebox *
- { \dim_eval:n {#2} }
- { \dim_eval:n {#3} }
- { \box_use:N #1 }
- }
- }
- \cs_set_protected:Npn \box_resize_to_ht_plus_dp:Nn #1#2
- {
- \hbox_set:Nn #1
- {
- \resizebox * { ! } { \dim_eval:n {#2} }
- { \box_use:N #1 }
- }
- }
- \cs_set_protected:Npn \box_resize_to_wd:Nn #1#2
- {
- \hbox_set:Nn #1
- {
- \resizebox * { \dim_eval:n {#2} } { ! }
- { \box_use:N #1 }
- }
- }
- \cs_set_protected:Npn \__box_scale_aux:N #1
- {
- \exp_last_unbraced:Nx \scalebox
- { { \fp_use:N \l__box_scale_x_fp } [ \fp_use:N \l__box_scale_y_fp ] }
- { \box_use:N #1 }
- }
- \cs_set_protected:Npn \color_ensure_current: { \set@color }
- }
+\tl_const:Nn \c__expl_def_ext_tl { def }
+\cs_new_protected:Npn \__kernel_sys_configuration_load:n #1
{
\group_begin:
\cs_set_protected:Npn \ProvidesExplFile
@@ -271,15 +55,46 @@
\char_set_catcode_space:n { `\ }
\ProvidesExplFileAux
}
- \cs_set_protected:Npn \ProvidesExplFileAux #1#2#3#4
+ \cs_set_protected:Npn \ProvidesExplFileAux ##1##2##3##4
{
\group_end:
- \ProvidesFile {#1} [ #2~v#3~#4 ]
+ \ProvidesFile {##1} [ ##2~v##3~##4 ]
}
- \tl_const:Nn \c__expl_def_ext_tl { def }
- \@onefilewithoptions { l3backend- \l__expl_driver_tl } [ ] [ ]
+ \cs_undefine:c { ver@ #1 .def }
+ \@onefilewithoptions {#1} [ ] [ ]
\c__expl_def_ext_tl
}
+\clist_new:N \l__expl_options_clist
+\DeclareOption*
+ { \clist_put_right:NV \l__expl_options_clist \CurrentOption }
+\ProcessOptions \relax
+\keys_define:nn { sys }
+ {
+ backend .choices:nn =
+ { dvipdfmx , dvips , dvisvgm , pdfmode , xdvipdfmx }
+ { \sys_load_backend:n {#1} } ,
+ check-declarations .code:n =
+ {
+ \sys_load_debug:
+ \debug_on:n { check-declarations }
+ } ,
+ driver .meta:n = { backend = #1 } ,
+ enable-debug .code:n =
+ \sys_load_debug: ,
+ log-functions .code:n =
+ {
+ \sys_load_debug:
+ \debug_on:n { log-functions }
+ } ,
+ undo-recent-deprecations .code:n =
+ {
+ \sys_load_deprecation:
+ \bool_gset_true:N \g__kernel_deprecation_undo_recent_bool
+ }
+ }
+\keys_set:nV { sys } \l__expl_options_clist
+\str_if_exist:NF \c_sys_backend_str
+ { \sys_load_backend:n { } }
\tl_put_left:Nn \@pushfilename
{
\exp_args:Nx \__kernel_file_input_push:n