%PDF- %PDF-
| Direktori : /proc/self/root/data/old/usr/share/texlive/texmf-dist/tex/latex/l3kernel/ |
| Current File : //proc/self/root/data/old/usr/share/texlive/texmf-dist/tex/latex/l3kernel/l3basics.sty |
%%
%% This is file `l3basics.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% l3basics.dtx (with options: `package')
%%
%% EXPERIMENTAL CODE
%%
%% Do not distribute this file without also distributing the
%% source files specified above.
%%
%% Do not distribute a modified version of this file.
%%
%% File: l3basics.dtx Copyright (C) 1990-2013 The LaTeX3 project
%%
%% It may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License (LPPL), either version 1.3c of this
%% license or (at your option) any later version. The latest version
%% of this license is in the file
%%
%% http://www.latex-project.org/lppl.txt
%%
%% This file is part of the "l3kernel bundle" (The Work in LPPL)
%% and all files in that bundle must be distributed together.
%%
%% The released version of this bundle is available from CTAN.
%%
%% -----------------------------------------------------------------------
%%
%% The development version of the bundle can be found at
%%
%% http://www.latex-project.org/svnroot/experimental/trunk/
%%
%% for those people who are interested.
%%
%%%%%%%%%%%
%% NOTE: %%
%%%%%%%%%%%
%%
%% Snapshots taken from the repository represent work in progress and may
%% not work or may contain conflicting material! We therefore ask
%% people _not_ to put them into distributions, archives, etc. without
%% prior consultation with the LaTeX3 Project.
%%
%% -----------------------------------------------------------------------
\RequirePackage{l3bootstrap}
\GetIdInfo$Id: l3basics.dtx 4428 2013-01-10 13:23:29Z bruno $
{L3 Basic definitions}
\ProvidesExplPackage
{\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
\__expl_package_check:
\tex_let:D \if_true: \tex_iftrue:D
\tex_let:D \if_false: \tex_iffalse:D
\tex_let:D \or: \tex_or:D
\tex_let:D \else: \tex_else:D
\tex_let:D \fi: \tex_fi:D
\tex_let:D \reverse_if:N \etex_unless:D
\tex_let:D \if:w \tex_if:D
\tex_let:D \if_charcode:w \tex_if:D
\tex_let:D \if_catcode:w \tex_ifcat:D
\tex_let:D \if_meaning:w \tex_ifx:D
\tex_let:D \if_mode_math: \tex_ifmmode:D
\tex_let:D \if_mode_horizontal: \tex_ifhmode:D
\tex_let:D \if_mode_vertical: \tex_ifvmode:D
\tex_let:D \if_mode_inner: \tex_ifinner:D
\tex_let:D \if_cs_exist:N \etex_ifdefined:D
\tex_let:D \if_cs_exist:w \etex_ifcsname:D
\tex_let:D \cs:w \tex_csname:D
\tex_let:D \cs_end: \tex_endcsname:D
\tex_let:D \exp_after:wN \tex_expandafter:D
\tex_let:D \exp_not:N \tex_noexpand:D
\tex_let:D \exp_not:n \etex_unexpanded:D
\tex_let:D \token_to_meaning:N \tex_meaning:D
\tex_let:D \token_to_str:N \tex_string:D
\tex_let:D \cs_meaning:N \tex_meaning:D
\tex_let:D \scan_stop: \tex_relax:D
\tex_let:D \group_begin: \tex_begingroup:D
\tex_let:D \group_end: \tex_endgroup:D
\tex_let:D \if_int_compare:w \tex_ifnum:D
\tex_let:D \__int_to_roman:w \tex_romannumeral:D
\tex_let:D \group_insert_after:N \tex_aftergroup:D
\tex_long:D \tex_def:D \exp_args:Nc #1#2
{ \exp_after:wN #1 \cs:w #2 \cs_end: }
\tex_long:D \tex_def:D \exp_args:cc #1#2
{ \cs:w #1 \exp_after:wN \cs_end: \cs:w #2 \cs_end: }
\tex_def:D \token_to_str:c { \exp_args:Nc \token_to_str:N }
\tex_long:D \tex_def:D \cs_meaning:c #1
{
\if_cs_exist:w #1 \cs_end:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
\fi:
{ \exp_args:Nc \cs_meaning:N {#1} }
{ \tl_to_str:n {undefined} }
}
\tex_let:D \token_to_meaning:c = \cs_meaning:c
\tex_let:D \c_minus_one \m@ne
\tex_chardef:D \c_sixteen = 16 ~
\tex_chardef:D \c_zero = 0 ~
\tex_chardef:D \c_six = 6 ~
\tex_chardef:D \c_seven = 7 ~
\tex_chardef:D \c_twelve = 12 ~
\etex_ifdefined:D \luatex_luatexversion:D
\tex_chardef:D \c_max_register_int = 65 535 ~
\tex_else:D
\tex_mathchardef:D \c_max_register_int = 32 767 ~
\tex_fi:D
\tex_let:D \cs_set_nopar:Npn \tex_def:D
\tex_let:D \cs_set_nopar:Npx \tex_edef:D
\etex_protected:D \cs_set_nopar:Npn \cs_set:Npn
{ \tex_long:D \cs_set_nopar:Npn }
\etex_protected:D \cs_set_nopar:Npn \cs_set:Npx
{ \tex_long:D \cs_set_nopar:Npx }
\etex_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npn
{ \etex_protected:D \cs_set_nopar:Npn }
\etex_protected:D \cs_set_nopar:Npn \cs_set_protected_nopar:Npx
{ \etex_protected:D \cs_set_nopar:Npx }
\cs_set_protected_nopar:Npn \cs_set_protected:Npn
{ \etex_protected:D \tex_long:D \cs_set_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_set_protected:Npx
{ \etex_protected:D \tex_long:D \cs_set_nopar:Npx }
\tex_let:D \cs_gset_nopar:Npn \tex_gdef:D
\tex_let:D \cs_gset_nopar:Npx \tex_xdef:D
\cs_set_protected_nopar:Npn \cs_gset:Npn
{ \tex_long:D \cs_gset_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_gset:Npx
{ \tex_long:D \cs_gset_nopar:Npx }
\cs_set_protected_nopar:Npn \cs_gset_protected_nopar:Npn
{ \etex_protected:D \cs_gset_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_gset_protected_nopar:Npx
{ \etex_protected:D \cs_gset_nopar:Npx }
\cs_set_protected_nopar:Npn \cs_gset_protected:Npn
{ \etex_protected:D \tex_long:D \cs_gset_nopar:Npn }
\cs_set_protected_nopar:Npn \cs_gset_protected:Npx
{ \etex_protected:D \tex_long:D \cs_gset_nopar:Npx }
\cs_set_nopar:Npn \l__exp_internal_tl { }
\cs_set:Npn \use:c #1 { \cs:w #1 \cs_end: }
\cs_set_protected:Npn \use:x #1
{
\cs_set_nopar:Npx \l__exp_internal_tl {#1}
\l__exp_internal_tl
}
\cs_set:Npn \use:n #1 {#1}
\cs_set:Npn \use:nn #1#2 {#1#2}
\cs_set:Npn \use:nnn #1#2#3 {#1#2#3}
\cs_set:Npn \use:nnnn #1#2#3#4 {#1#2#3#4}
\cs_set:Npn \use_i:nn #1#2 {#1}
\cs_set:Npn \use_ii:nn #1#2 {#2}
\cs_set:Npn \use_i:nnn #1#2#3 {#1}
\cs_set:Npn \use_ii:nnn #1#2#3 {#2}
\cs_set:Npn \use_iii:nnn #1#2#3 {#3}
\cs_set:Npn \use_i_ii:nnn #1#2#3 {#1#2}
\cs_set:Npn \use_i:nnnn #1#2#3#4 {#1}
\cs_set:Npn \use_ii:nnnn #1#2#3#4 {#2}
\cs_set:Npn \use_iii:nnnn #1#2#3#4 {#3}
\cs_set:Npn \use_iv:nnnn #1#2#3#4 {#4}
\cs_set:Npn \use_none_delimit_by_q_nil:w #1 \q_nil { }
\cs_set:Npn \use_none_delimit_by_q_stop:w #1 \q_stop { }
\cs_set:Npn \use_none_delimit_by_q_recursion_stop:w #1 \q_recursion_stop { }
\cs_set:Npn \use_i_delimit_by_q_nil:nw #1#2 \q_nil {#1}
\cs_set:Npn \use_i_delimit_by_q_stop:nw #1#2 \q_stop {#1}
\cs_set:Npn \use_i_delimit_by_q_recursion_stop:nw #1#2 \q_recursion_stop {#1}
\cs_set:Npn \use_none:n #1 { }
\cs_set:Npn \use_none:nn #1#2 { }
\cs_set:Npn \use_none:nnn #1#2#3 { }
\cs_set:Npn \use_none:nnnn #1#2#3#4 { }
\cs_set:Npn \use_none:nnnnn #1#2#3#4#5 { }
\cs_set:Npn \use_none:nnnnnn #1#2#3#4#5#6 { }
\cs_set:Npn \use_none:nnnnnnn #1#2#3#4#5#6#7 { }
\cs_set:Npn \use_none:nnnnnnnn #1#2#3#4#5#6#7#8 { }
\cs_set:Npn \use_none:nnnnnnnnn #1#2#3#4#5#6#7#8#9 { }
\cs_set_nopar:Npn \prg_return_true:
{ \exp_after:wN \use_i:nn \__int_to_roman:w }
\cs_set_nopar:Npn \prg_return_false:
{ \exp_after:wN \use_ii:nn \__int_to_roman:w}
\cs_set_protected_nopar:Npn \prg_set_conditional:Npnn
{ \__prg_generate_conditional_parm:nnNpnn { set } { } }
\cs_set_protected_nopar:Npn \prg_new_conditional:Npnn
{ \__prg_generate_conditional_parm:nnNpnn { new } { } }
\cs_set_protected_nopar:Npn \prg_set_protected_conditional:Npnn
{ \__prg_generate_conditional_parm:nnNpnn { set } { _protected } }
\cs_set_protected_nopar:Npn \prg_new_protected_conditional:Npnn
{ \__prg_generate_conditional_parm:nnNpnn { new } { _protected } }
\cs_set_protected:Npn \__prg_generate_conditional_parm:nnNpnn #1#2#3#4#
{
\__cs_split_function:NN #3 \__prg_generate_conditional:nnNnnnnn
{#1} {#2} {#4}
}
\cs_set_protected_nopar:Npn \prg_set_conditional:Nnn
{ \__prg_generate_conditional_count:nnNnn { set } { } }
\cs_set_protected_nopar:Npn \prg_new_conditional:Nnn
{ \__prg_generate_conditional_count:nnNnn { new } { } }
\cs_set_protected_nopar:Npn \prg_set_protected_conditional:Nnn
{ \__prg_generate_conditional_count:nnNnn { set } { _protected } }
\cs_set_protected_nopar:Npn \prg_new_protected_conditional:Nnn
{ \__prg_generate_conditional_count:nnNnn { new } { _protected } }
\cs_set_protected:Npn \__prg_generate_conditional_count:nnNnn #1#2#3
{
\__cs_split_function:NN #3 \__prg_generate_conditional_count:nnNnnnn
{#1} {#2}
}
\cs_set_protected:Npn \__prg_generate_conditional_count:nnNnnnn #1#2#3#4#5
{
\__cs_parm_from_arg_count:nnF
{ \__prg_generate_conditional:nnNnnnnn {#1} {#2} #3 {#4} {#5} }
{ \tl_count:n {#2} }
{
\__msg_kernel_error:nnxx { kernel } { bad-number-of-arguments }
{ \token_to_str:c { #1 : #2 } }
{ \tl_count:n {#2} }
\use_none:nn
}
}
\cs_set_protected:Npn \__prg_generate_conditional:nnNnnnnn #1#2#3#4#5#6#7#8
{
\if_meaning:w \c_false_bool #3
\__msg_kernel_error:nnx { kernel } { missing-colon }
{ \token_to_str:c {#1} }
\exp_after:wN \use_none:nn
\fi:
\use:x
{
\exp_not:N \__prg_generate_conditional:nnnnnnw
\exp_not:n { {#4} {#5} {#1} {#2} {#6} {#8} }
\etex_detokenize:D {#7}
\exp_not:n { , \q_recursion_tail , \q_recursion_stop }
}
}
\cs_set_protected:Npn \__prg_generate_conditional:nnnnnnw #1#2#3#4#5#6#7 ,
{
\if_meaning:w \q_recursion_tail #7
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
\fi:
\use:c { __prg_generate_ #7 _form:wnnnnnn }
\tl_if_empty:nF {#7}
{
\__msg_kernel_error:nnxx
{ kernel } { conditional-form-unknown }
{#7} { \token_to_str:c { #3 : #4 } }
}
\use_none:nnnnnnn
\q_stop
{#1} {#2} {#3} {#4} {#5} {#6}
\__prg_generate_conditional:nnnnnnw {#1} {#2} {#3} {#4} {#5} {#6}
}
\cs_set_protected:Npn \__prg_generate_p_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7
{
\if_meaning:w \scan_stop: #3 \scan_stop:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
\fi:
{
\exp_args:cc { cs_ #2 #3 :Npn } { #4 _p: #5 } #6
{ #7 \c_zero \c_true_bool \c_false_bool }
}
{
\__msg_kernel_error:nnx { kernel } { protected-predicate }
{ \token_to_str:c { #4 _p: #5 } }
}
}
\cs_set_protected:Npn \__prg_generate_T_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7
{
\exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 T } #6
{ #7 \c_zero \use:n \use_none:n }
}
\cs_set_protected:Npn \__prg_generate_F_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7
{
\exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 F } #6
{ #7 \c_zero { } }
}
\cs_set_protected:Npn \__prg_generate_TF_form:wnnnnnn #1 \q_stop #2#3#4#5#6#7
{
\exp_args:cc { cs_ #2 #3 :Npn } { #4 : #5 TF } #6
{ #7 \c_zero }
}
\cs_set_protected_nopar:Npn \prg_set_eq_conditional:NNn
{ \__prg_set_eq_conditional:NNNn \cs_set_eq:cc }
\cs_set_protected_nopar:Npn \prg_new_eq_conditional:NNn
{ \__prg_set_eq_conditional:NNNn \cs_new_eq:cc }
\cs_set_protected:Npn \__prg_set_eq_conditional:NNNn #1#2#3#4
{
\use:x
{
\exp_not:N \__prg_set_eq_conditional:nnNnnNNw
\__cs_split_function:NN #2 \prg_do_nothing:
\__cs_split_function:NN #3 \prg_do_nothing:
\exp_not:N #1
\etex_detokenize:D {#4}
\exp_not:n { , \q_recursion_tail , \q_recursion_stop }
}
}
\cs_set_protected:Npn \__prg_set_eq_conditional:nnNnnNNw #1#2#3#4#5#6
{
\if_meaning:w \c_false_bool #3
\__msg_kernel_error:nnx { kernel } { missing-colon }
{ \token_to_str:c {#1} }
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
\fi:
\if_meaning:w \c_false_bool #6
\__msg_kernel_error:nnx { kernel } { missing-colon }
{ \token_to_str:c {#4} }
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
\fi:
\__prg_set_eq_conditional_loop:nnnnNw {#1} {#2} {#4} {#5}
}
\cs_set_protected:Npn \__prg_set_eq_conditional_loop:nnnnNw #1#2#3#4#5#6 ,
{
\if_meaning:w \q_recursion_tail #6
\exp_after:wN \use_none_delimit_by_q_recursion_stop:w
\fi:
\use:c { __prg_set_eq_conditional_ #6 _form:wNnnnn }
\tl_if_empty:nF {#6}
{
\__msg_kernel_error:nnxx
{ kernel } { conditional-form-unknown }
{#6} { \token_to_str:c { #1 : #2 } }
}
\use_none:nnnnnn
\q_stop
#5 {#1} {#2} {#3} {#4}
\__prg_set_eq_conditional_loop:nnnnNw {#1} {#2} {#3} {#4} #5
}
\cs_set:Npn \__prg_set_eq_conditional_p_form:wNnnnn #1 \q_stop #2#3#4#5#6
{
\__chk_if_exist_cs:c { #5 _p : #6 }
#2 { #3 _p : #4 } { #5 _p : #6 }
}
\cs_set:Npn \__prg_set_eq_conditional_TF_form:wNnnnn #1 \q_stop #2#3#4#5#6
{
\__chk_if_exist_cs:c { #5 : #6 TF }
#2 { #3 : #4 TF } { #5 : #6 TF }
}
\cs_set:Npn \__prg_set_eq_conditional_T_form:wNnnnn #1 \q_stop #2#3#4#5#6
{
\__chk_if_exist_cs:c { #5 : #6 T }
#2 { #3 : #4 T } { #5 : #6 T }
}
\cs_set:Npn \__prg_set_eq_conditional_F_form:wNnnnn #1 \q_stop #2#3#4#5#6
{
\__chk_if_exist_cs:c { #5 : #6 F }
#2 { #3 : #4 F } { #5 : #6 F }
}
\tex_chardef:D \c_true_bool = 1 ~
\tex_chardef:D \c_false_bool = 0 ~
\cs_set_nopar:Npn \cs_to_str:N
{
\__int_to_roman:w
\if:w \token_to_str:N \ \__cs_to_str:w \fi:
\exp_after:wN \__cs_to_str:N \token_to_str:N
}
\cs_set:Npn \__cs_to_str:N #1 { \c_zero }
\cs_set:Npn \__cs_to_str:w #1 \__cs_to_str:N
{ - \__int_value:w \fi: \exp_after:wN \c_zero }
\group_begin:
\tex_lccode:D `\@ = `\: \scan_stop:
\tex_catcode:D `\@ = 12 ~
\tex_lowercase:D
{
\group_end:
\cs_set:Npn \__cs_split_function:NN #1
{
\exp_after:wN \exp_after:wN
\exp_after:wN \__cs_split_function_auxi:w
\cs_to_str:N #1 \q_mark \c_true_bool
@ \q_mark \c_false_bool
\q_stop
}
\cs_set:Npn \__cs_split_function_auxi:w #1 @ #2 \q_mark #3#4 \q_stop #5
{ \__cs_split_function_auxii:w #5 #1 \q_mark \q_stop {#2} #3 }
\cs_set:Npn \__cs_split_function_auxii:w #1#2 \q_mark #3 \q_stop
{ #1 {#2} }
}
\cs_set:Npn \__cs_get_function_name:N #1
{ \__cs_split_function:NN #1 \use_i:nnn }
\cs_set:Npn \__cs_get_function_signature:N #1
{ \__cs_split_function:NN #1 \use_ii:nnn }
\prg_set_conditional:Npnn \cs_if_exist:N #1 { p , T , F , TF }
{
\if_meaning:w #1 \scan_stop:
\prg_return_false:
\else:
\if_cs_exist:N #1
\prg_return_true:
\else:
\prg_return_false:
\fi:
\fi:
}
\prg_set_conditional:Npnn \cs_if_exist:c #1 { p , T , F , TF }
{
\if_cs_exist:w #1 \cs_end:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
\fi:
{
\exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop:
\prg_return_false:
\else:
\prg_return_true:
\fi:
}
\prg_return_false:
}
\prg_set_conditional:Npnn \cs_if_free:N #1 { p , T , F , TF }
{
\if_meaning:w #1 \scan_stop:
\prg_return_true:
\else:
\if_cs_exist:N #1
\prg_return_false:
\else:
\prg_return_true:
\fi:
\fi:
}
\prg_set_conditional:Npnn \cs_if_free:c #1 { p , T , F , TF }
{
\if_cs_exist:w #1 \cs_end:
\exp_after:wN \use_i:nn
\else:
\exp_after:wN \use_ii:nn
\fi:
{
\exp_after:wN \if_meaning:w \cs:w #1 \cs_end: \scan_stop:
\prg_return_true:
\else:
\prg_return_false:
\fi:
}
{ \prg_return_true: }
}
\cs_set:Npn \cs_if_exist_use:NTF #1#2
{ \cs_if_exist:NTF #1 { #1 #2 } }
\cs_set:Npn \cs_if_exist_use:NF #1
{ \cs_if_exist:NTF #1 { #1 } }
\cs_set:Npn \cs_if_exist_use:NT #1 #2
{ \cs_if_exist:NTF #1 { #1 #2 } { } }
\cs_set:Npn \cs_if_exist_use:N #1
{ \cs_if_exist:NTF #1 { #1 } { } }
\cs_set:Npn \cs_if_exist_use:cTF #1#2
{ \cs_if_exist:cTF {#1} { \use:c {#1} #2 } }
\cs_set:Npn \cs_if_exist_use:cF #1
{ \cs_if_exist:cTF {#1} { \use:c {#1} } }
\cs_set:Npn \cs_if_exist_use:cT #1#2
{ \cs_if_exist:cTF {#1} { \use:c {#1} #2 } { } }
\cs_set:Npn \cs_if_exist_use:c #1
{ \cs_if_exist:cTF {#1} { \use:c {#1} } { } }
\cs_set_protected_nopar:Npn \iow_log:x
{ \tex_immediate:D \tex_write:D \c_minus_one }
\cs_set_protected_nopar:Npn \iow_term:x
{ \tex_immediate:D \tex_write:D \c_sixteen }
\cs_set_protected:Npn \__msg_kernel_error:nnxx #1#2#3#4
{
\tex_errmessage:D
{
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~! ^^J
Argh,~internal~LaTeX3~error! ^^J ^^J
Module ~ #1 , ~ message~name~"#2": ^^J
Arguments~'#3'~and~'#4' ^^J ^^J
This~is~one~for~The~LaTeX3~Project:~bailing~out
}
\tex_end:D
}
\cs_set_protected:Npn \__msg_kernel_error:nnx #1#2#3
{ \__msg_kernel_error:nnxx {#1} {#2} {#3} { } }
\cs_set_protected:Npn \__msg_kernel_error:nn #1#2
{ \__msg_kernel_error:nnxx {#1} {#2} { } { } }
\cs_set_nopar:Npn \msg_line_context:
{ on~line~ \tex_the:D \tex_inputlineno:D }
\cs_set_protected:Npn \__chk_if_free_cs:N #1
{
\cs_if_free:NF #1
{
\__msg_kernel_error:nnxx { kernel } { command-already-defined }
{ \token_to_str:N #1 } { \token_to_meaning:N #1 }
}
}
\tex_ifodd:D \l@expl@log@functions@bool
\cs_set_protected:Npn \__chk_if_free_cs:N #1
{
\cs_if_free:NF #1
{
\__msg_kernel_error:nnxx { kernel } { command-already-defined }
{ \token_to_str:N #1 } { \token_to_meaning:N #1 }
}
\iow_log:x { Defining~\token_to_str:N #1~ \msg_line_context: }
}
\fi:
\cs_set_protected_nopar:Npn \__chk_if_free_cs:c
{ \exp_args:Nc \__chk_if_free_cs:N }
\cs_set_protected:Npn \__chk_if_exist_cs:N #1
{
\cs_if_exist:NF #1
{
\__msg_kernel_error:nnx { kernel } { command-not-defined }
{ \token_to_str:N #1 }
}
}
\cs_set_protected_nopar:Npn \__chk_if_exist_cs:c
{ \exp_args:Nc \__chk_if_exist_cs:N }
\cs_set:Npn \__cs_tmp:w #1#2
{
\cs_set_protected:Npn #1 ##1
{
\__chk_if_free_cs:N ##1
#2 ##1
}
}
\__cs_tmp:w \cs_new_nopar:Npn \cs_gset_nopar:Npn
\__cs_tmp:w \cs_new_nopar:Npx \cs_gset_nopar:Npx
\__cs_tmp:w \cs_new:Npn \cs_gset:Npn
\__cs_tmp:w \cs_new:Npx \cs_gset:Npx
\__cs_tmp:w \cs_new_protected_nopar:Npn \cs_gset_protected_nopar:Npn
\__cs_tmp:w \cs_new_protected_nopar:Npx \cs_gset_protected_nopar:Npx
\__cs_tmp:w \cs_new_protected:Npn \cs_gset_protected:Npn
\__cs_tmp:w \cs_new_protected:Npx \cs_gset_protected:Npx
\cs_set:Npn \__cs_tmp:w #1#2
{ \cs_new_protected_nopar:Npn #1 { \exp_args:Nc #2 } }
\__cs_tmp:w \cs_set_nopar:cpn \cs_set_nopar:Npn
\__cs_tmp:w \cs_set_nopar:cpx \cs_set_nopar:Npx
\__cs_tmp:w \cs_gset_nopar:cpn \cs_gset_nopar:Npn
\__cs_tmp:w \cs_gset_nopar:cpx \cs_gset_nopar:Npx
\__cs_tmp:w \cs_new_nopar:cpn \cs_new_nopar:Npn
\__cs_tmp:w \cs_new_nopar:cpx \cs_new_nopar:Npx
\__cs_tmp:w \cs_set:cpn \cs_set:Npn
\__cs_tmp:w \cs_set:cpx \cs_set:Npx
\__cs_tmp:w \cs_gset:cpn \cs_gset:Npn
\__cs_tmp:w \cs_gset:cpx \cs_gset:Npx
\__cs_tmp:w \cs_new:cpn \cs_new:Npn
\__cs_tmp:w \cs_new:cpx \cs_new:Npx
\__cs_tmp:w \cs_set_protected_nopar:cpn \cs_set_protected_nopar:Npn
\__cs_tmp:w \cs_set_protected_nopar:cpx \cs_set_protected_nopar:Npx
\__cs_tmp:w \cs_gset_protected_nopar:cpn \cs_gset_protected_nopar:Npn
\__cs_tmp:w \cs_gset_protected_nopar:cpx \cs_gset_protected_nopar:Npx
\__cs_tmp:w \cs_new_protected_nopar:cpn \cs_new_protected_nopar:Npn
\__cs_tmp:w \cs_new_protected_nopar:cpx \cs_new_protected_nopar:Npx
\__cs_tmp:w \cs_set_protected:cpn \cs_set_protected:Npn
\__cs_tmp:w \cs_set_protected:cpx \cs_set_protected:Npx
\__cs_tmp:w \cs_gset_protected:cpn \cs_gset_protected:Npn
\__cs_tmp:w \cs_gset_protected:cpx \cs_gset_protected:Npx
\__cs_tmp:w \cs_new_protected:cpn \cs_new_protected:Npn
\__cs_tmp:w \cs_new_protected:cpx \cs_new_protected:Npx
\cs_new_protected:Npn \cs_set_eq:NN #1 { \tex_let:D #1 =~ }
\cs_new_protected_nopar:Npn \cs_set_eq:cN { \exp_args:Nc \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_set_eq:Nc { \exp_args:NNc \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_set_eq:cc { \exp_args:Ncc \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:NN { \tex_global:D \cs_set_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:Nc { \exp_args:NNc \cs_gset_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:cN { \exp_args:Nc \cs_gset_eq:NN }
\cs_new_protected_nopar:Npn \cs_gset_eq:cc { \exp_args:Ncc \cs_gset_eq:NN }
\cs_new_protected:Npn \cs_new_eq:NN #1
{
\__chk_if_free_cs:N #1
\tex_global:D \cs_set_eq:NN #1
}
\cs_new_protected_nopar:Npn \cs_new_eq:cN { \exp_args:Nc \cs_new_eq:NN }
\cs_new_protected_nopar:Npn \cs_new_eq:Nc { \exp_args:NNc \cs_new_eq:NN }
\cs_new_protected_nopar:Npn \cs_new_eq:cc { \exp_args:Ncc \cs_new_eq:NN }
\cs_new_protected:Npn \cs_undefine:N #1
{ \cs_gset_eq:NN #1 \tex_undefined:D }
\cs_new_protected:Npn \cs_undefine:c #1
{
\if_cs_exist:w #1 \cs_end:
\exp_after:wN \use:n
\else:
\exp_after:wN \use_none:n
\fi:
{ \cs_gset_eq:cN {#1} \tex_undefined:D }
}
\cs_set_protected:Npn \__cs_parm_from_arg_count:nnF #1#2
{
\exp_args:Nx \__cs_parm_from_arg_count_test:nnF
{
\exp_after:wN \exp_not:n
\if_case:w \__int_eval:w #2 \__int_eval_end:
{ }
\or: { ##1 }
\or: { ##1##2 }
\or: { ##1##2##3 }
\or: { ##1##2##3##4 }
\or: { ##1##2##3##4##5 }
\or: { ##1##2##3##4##5##6 }
\or: { ##1##2##3##4##5##6##7 }
\or: { ##1##2##3##4##5##6##7##8 }
\or: { ##1##2##3##4##5##6##7##8##9 }
\else: { \c_false_bool }
\fi:
}
{#1}
}
\cs_set_protected:Npn \__cs_parm_from_arg_count_test:nnF #1#2
{
\if_meaning:w \c_false_bool #1
\exp_after:wN \use_ii:nn
\else:
\exp_after:wN \use_i:nn
\fi:
{ #2 {#1} }
}
\cs_new:Npn \__cs_count_signature:N #1
{ \int_eval:n { \__cs_split_function:NN #1 \__cs_count_signature:nnN } }
\cs_new:Npn \__cs_count_signature:nnN #1#2#3
{
\if_meaning:w \c_true_bool #3
\tl_count:n {#2}
\else:
\c_minus_one
\fi:
}
\cs_new_nopar:Npn \__cs_count_signature:c
{ \exp_args:Nc \__cs_count_signature:N }
\cs_new_protected:Npn \cs_generate_from_arg_count:NNnn #1#2#3#4
{
\__cs_parm_from_arg_count:nnF { \use:nnn #2 #1 } {#3}
{
\__msg_kernel_error:nnxx { kernel } { bad-number-of-arguments }
{ \token_to_str:N #1 } { \int_eval:n {#3} }
}
{#4}
}
\cs_new_protected_nopar:Npn \cs_generate_from_arg_count:cNnn
{ \exp_args:Nc \cs_generate_from_arg_count:NNnn }
\cs_new_protected_nopar:Npn \cs_generate_from_arg_count:Ncnn
{ \exp_args:NNc \cs_generate_from_arg_count:NNnn }
\cs_set:Npn \__cs_tmp:w #1#2#3
{
\cs_new_protected_nopar:cpx { cs_ #1 : #2 }
{
\exp_not:N \__cs_generate_from_signature:NNn
\exp_after:wN \exp_not:N \cs:w cs_ #1 : #3 \cs_end:
}
}
\cs_new_protected:Npn \__cs_generate_from_signature:NNn #1#2
{
\__cs_split_function:NN #2 \__cs_generate_from_signature:nnNNNn
#1 #2
}
\cs_new_protected:Npn \__cs_generate_from_signature:nnNNNn #1#2#3#4#5#6
{
\bool_if:NTF #3
{
\cs_generate_from_arg_count:NNnn
#5 #4 { \tl_count:n {#2} } {#6}
}
{
\__msg_kernel_error:nnx { kernel } { missing-colon }
{ \token_to_str:N #5 }
}
}
\__cs_tmp:w { set } { Nn } { Npn }
\__cs_tmp:w { set } { Nx } { Npx }
\__cs_tmp:w { set_nopar } { Nn } { Npn }
\__cs_tmp:w { set_nopar } { Nx } { Npx }
\__cs_tmp:w { set_protected } { Nn } { Npn }
\__cs_tmp:w { set_protected } { Nx } { Npx }
\__cs_tmp:w { set_protected_nopar } { Nn } { Npn }
\__cs_tmp:w { set_protected_nopar } { Nx } { Npx }
\__cs_tmp:w { gset } { Nn } { Npn }
\__cs_tmp:w { gset } { Nx } { Npx }
\__cs_tmp:w { gset_nopar } { Nn } { Npn }
\__cs_tmp:w { gset_nopar } { Nx } { Npx }
\__cs_tmp:w { gset_protected } { Nn } { Npn }
\__cs_tmp:w { gset_protected } { Nx } { Npx }
\__cs_tmp:w { gset_protected_nopar } { Nn } { Npn }
\__cs_tmp:w { gset_protected_nopar } { Nx } { Npx }
\__cs_tmp:w { new } { Nn } { Npn }
\__cs_tmp:w { new } { Nx } { Npx }
\__cs_tmp:w { new_nopar } { Nn } { Npn }
\__cs_tmp:w { new_nopar } { Nx } { Npx }
\__cs_tmp:w { new_protected } { Nn } { Npn }
\__cs_tmp:w { new_protected } { Nx } { Npx }
\__cs_tmp:w { new_protected_nopar } { Nn } { Npn }
\__cs_tmp:w { new_protected_nopar } { Nx } { Npx }
\cs_set:Npn \__cs_tmp:w #1#2
{
\cs_new_protected_nopar:cpx { cs_ #1 : c #2 }
{
\exp_not:N \exp_args:Nc
\exp_after:wN \exp_not:N \cs:w cs_ #1 : N #2 \cs_end:
}
}
\__cs_tmp:w { set } { n }
\__cs_tmp:w { set } { x }
\__cs_tmp:w { set_nopar } { n }
\__cs_tmp:w { set_nopar } { x }
\__cs_tmp:w { set_protected } { n }
\__cs_tmp:w { set_protected } { x }
\__cs_tmp:w { set_protected_nopar } { n }
\__cs_tmp:w { set_protected_nopar } { x }
\__cs_tmp:w { gset } { n }
\__cs_tmp:w { gset } { x }
\__cs_tmp:w { gset_nopar } { n }
\__cs_tmp:w { gset_nopar } { x }
\__cs_tmp:w { gset_protected } { n }
\__cs_tmp:w { gset_protected } { x }
\__cs_tmp:w { gset_protected_nopar } { n }
\__cs_tmp:w { gset_protected_nopar } { x }
\__cs_tmp:w { new } { n }
\__cs_tmp:w { new } { x }
\__cs_tmp:w { new_nopar } { n }
\__cs_tmp:w { new_nopar } { x }
\__cs_tmp:w { new_protected } { n }
\__cs_tmp:w { new_protected } { x }
\__cs_tmp:w { new_protected_nopar } { n }
\__cs_tmp:w { new_protected_nopar } { x }
\prg_new_conditional:Npnn \cs_if_eq:NN #1#2 { p , T , F , TF }
{
\if_meaning:w #1#2
\prg_return_true: \else: \prg_return_false: \fi:
}
\cs_new_nopar:Npn \cs_if_eq_p:cN { \exp_args:Nc \cs_if_eq_p:NN }
\cs_new_nopar:Npn \cs_if_eq:cNTF { \exp_args:Nc \cs_if_eq:NNTF }
\cs_new_nopar:Npn \cs_if_eq:cNT { \exp_args:Nc \cs_if_eq:NNT }
\cs_new_nopar:Npn \cs_if_eq:cNF { \exp_args:Nc \cs_if_eq:NNF }
\cs_new_nopar:Npn \cs_if_eq_p:Nc { \exp_args:NNc \cs_if_eq_p:NN }
\cs_new_nopar:Npn \cs_if_eq:NcTF { \exp_args:NNc \cs_if_eq:NNTF }
\cs_new_nopar:Npn \cs_if_eq:NcT { \exp_args:NNc \cs_if_eq:NNT }
\cs_new_nopar:Npn \cs_if_eq:NcF { \exp_args:NNc \cs_if_eq:NNF }
\cs_new_nopar:Npn \cs_if_eq_p:cc { \exp_args:Ncc \cs_if_eq_p:NN }
\cs_new_nopar:Npn \cs_if_eq:ccTF { \exp_args:Ncc \cs_if_eq:NNTF }
\cs_new_nopar:Npn \cs_if_eq:ccT { \exp_args:Ncc \cs_if_eq:NNT }
\cs_new_nopar:Npn \cs_if_eq:ccF { \exp_args:Ncc \cs_if_eq:NNF }
\cs_new_protected:Npn \__kernel_register_show:N #1
{
\cs_if_exist:NTF #1
{ \tex_showthe:D \use:n {#1} }
{
\__msg_kernel_error:nnx { kernel } { variable-not-defined }
{ \token_to_str:N #1 }
}
}
\cs_new_protected_nopar:Npn \__kernel_register_show:c
{ \exp_args:Nc \__kernel_register_show:N }
\group_begin:
\tex_lccode:D `? = `: \scan_stop:
\tex_catcode:D `? = 12 \scan_stop:
\tex_lowercase:D
{
\group_end:
\cs_new_protected:Npn \cs_show:N #1
{
\__msg_show_variable:n
{
> ~ \token_to_str:N #1 =
\exp_after:wN \__cs_show:www \cs_meaning:N #1
\use_none:nn ? \prg_do_nothing:
}
}
\cs_new:Npn \__cs_show:www #1 ? { #1 ? \\ }
}
\cs_new_protected_nopar:Npn \cs_show:c
{ \group_begin: \exp_args:NNc \group_end: \cs_show:N }
\cs_new_eq:NN \luatex_if_engine:T \use_none:n
\cs_new_eq:NN \luatex_if_engine:F \use:n
\cs_new_eq:NN \luatex_if_engine:TF \use_ii:nn
\cs_new_eq:NN \pdftex_if_engine:T \use:n
\cs_new_eq:NN \pdftex_if_engine:F \use_none:n
\cs_new_eq:NN \pdftex_if_engine:TF \use_i:nn
\cs_new_eq:NN \xetex_if_engine:T \use_none:n
\cs_new_eq:NN \xetex_if_engine:F \use:n
\cs_new_eq:NN \xetex_if_engine:TF \use_ii:nn
\cs_new_eq:NN \luatex_if_engine_p: \c_false_bool
\cs_new_eq:NN \pdftex_if_engine_p: \c_true_bool
\cs_new_eq:NN \xetex_if_engine_p: \c_false_bool
\cs_if_exist:NT \xetex_XeTeXversion:D
{
\cs_gset_eq:NN \pdftex_if_engine:T \use_none:n
\cs_gset_eq:NN \pdftex_if_engine:F \use:n
\cs_gset_eq:NN \pdftex_if_engine:TF \use_ii:nn
\cs_gset_eq:NN \xetex_if_engine:T \use:n
\cs_gset_eq:NN \xetex_if_engine:F \use_none:n
\cs_gset_eq:NN \xetex_if_engine:TF \use_i:nn
\cs_gset_eq:NN \pdftex_if_engine_p: \c_false_bool
\cs_gset_eq:NN \xetex_if_engine_p: \c_true_bool
}
\cs_if_exist:NT \luatex_directlua:D
{
\cs_gset_eq:NN \luatex_if_engine:T \use:n
\cs_gset_eq:NN \luatex_if_engine:F \use_none:n
\cs_gset_eq:NN \luatex_if_engine:TF \use_i:nn
\cs_gset_eq:NN \pdftex_if_engine:T \use_none:n
\cs_gset_eq:NN \pdftex_if_engine:F \use:n
\cs_gset_eq:NN \pdftex_if_engine:TF \use_ii:nn
\cs_gset_eq:NN \luatex_if_engine_p: \c_true_bool
\cs_gset_eq:NN \pdftex_if_engine_p: \c_false_bool
}
\cs_new_nopar:Npn \prg_do_nothing: { }
\prg_new_conditional:Npnn \str_if_eq:nn #1#2 { p , T , F , TF }
{
\if_int_compare:w \pdftex_strcmp:D { \exp_not:n {#1} } { \exp_not:n {#2} }
= \c_zero
\prg_return_true: \else: \prg_return_false: \fi:
}
\prg_new_conditional:Npnn \str_if_eq_x:nn #1#2 { p , T , F , TF }
{
\if_int_compare:w \pdftex_strcmp:D {#1} {#2} = \c_zero
\prg_return_true: \else: \prg_return_false: \fi:
}
\cs_new:Npn \__str_if_eq_x_return:nn #1 #2
{
\if_int_compare:w \pdftex_strcmp:D {#1} {#2} = \c_zero
\prg_return_true:
\else:
\prg_return_false:
\fi:
}
\cs_new:Npn \str_case:nnn #1#2#3
{
\tex_romannumeral:D
\__str_case:nw {#1} #2 {#1} {#3} \q_recursion_stop
}
\cs_new:Npn \__str_case:nw #1#2#3
{
\str_if_eq:nnTF {#1} {#2}
{ \__str_case_end:nw {#3} }
{ \__str_case:nw {#1} }
}
\cs_new:Npn \str_case_x:nnn #1#2#3
{
\tex_romannumeral:D
\__str_case_x:nw {#1} #2 {#1} {#3} \q_recursion_stop
}
\cs_new:Npn \__str_case_x:nw #1#2#3
{
\str_if_eq_x:nnTF {#1} {#2}
{ \__str_case_end:nw {#3} }
{ \__str_case_x:nw {#1} }
}
\cs_new:Npn \__prg_case_end:nw #1#2 \q_recursion_stop { \c_zero #1 }
\cs_new_eq:NN \__str_case_end:nw \__prg_case_end:nw
\cs_new_eq:NN \__prg_break_point:Nn \use_ii:nn
\cs_new:Npn \__prg_map_break:Nn #1#2#3 \__prg_break_point:Nn #4#5
{
#5
\if_meaning:w #1 #4
\exp_after:wN \use_iii:nnn
\fi:
\__prg_map_break:Nn #1 {#2}
}
\cs_new_eq:NN \__prg_break_point: \prg_do_nothing:
\cs_new:Npn \__prg_break: #1 \__prg_break_point: { }
\cs_new:Npn \__prg_break:n #1#2 \__prg_break_point: {#1}
%%
%%
%% End of file `l3basics.sty'.