summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/expl3/l3basics.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-05-22 17:46:23 +0000
committerKarl Berry <karl@freefriends.org>2007-05-22 17:46:23 +0000
commitf4eb27d3314d15838f674a3872000159d029f88b (patch)
tree6e9ab33c5a2d702912b4a969ade4e4e2ac586d62 /Master/texmf-dist/tex/latex/expl3/l3basics.sty
parent14af3f447439750920f754792b89f113d019076a (diff)
update expl3
git-svn-id: svn://tug.org/texlive/trunk@4335 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/l3basics.sty')
-rw-r--r--Master/texmf-dist/tex/latex/expl3/l3basics.sty611
1 files changed, 459 insertions, 152 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/l3basics.sty b/Master/texmf-dist/tex/latex/expl3/l3basics.sty
index fb4f3de9da0..161ac199227 100644
--- a/Master/texmf-dist/tex/latex/expl3/l3basics.sty
+++ b/Master/texmf-dist/tex/latex/expl3/l3basics.sty
@@ -15,202 +15,509 @@
%% Do not distribute a modified version of this file.
%%
%%
-%% File: l3basics.dtx Copyright (C) 1990-1998 LaTeX3 project
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{l3basics}
- [1998/05/04 v1.0i L3 Experimental basic definitions]
-\RequirePackage{l3names}\par
+%% File: l3basics.dtx Copyright (C) 1990-2006 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 ``expl3 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/cgi-bin/cvsweb.cgi/
+%%
+%% 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 LaTeX Project Team.
+%%
+%% -----------------------------------------------------------------------
+\RequirePackage{l3names}
+\GetIdInfo$Id: l3basics.dtx 583 2006-12-12 17:26:44Z morten $
+ {L3 Experimental basic definitions}
\tex_let:D \let:NwN \tex_let:D
-\let:NwN \def:Npn \tex_def:D
-\let:NwN \gdef:Npn \tex_gdef:D
-\let:NwN \def:Npx \tex_edef:D
-\let:NwN \gdef:Npx \tex_xdef:D
-\let:NwN \if:w \tex_if:D
-\let:NwN \if_num:w \tex_ifnum:D
-\let:NwN \if_meaning:NN \tex_ifx:D
+\let:NwN \if_true: \tex_iftrue:D
\let:NwN \if_false: \tex_iffalse:D
\let:NwN \else: \tex_else:D
\let:NwN \fi: \tex_fi:D
+\let:NwN \reverse_if:N \etex_unless:D
+\let:NwN \if:w \tex_if:D
+\let:NwN \if_charcode:w \tex_if:D
+\let:NwN \if_catcode:w \tex_ifcat:D
+\let:NwN \if_meaning:NN \tex_ifx:D
+\let:NwN \if_token_eq:NN \tex_ifx:D
+\let:NwN \if_cs_meaning_eq:NN\tex_ifx:D
+\let:NwN \if_mode_math: \tex_ifmmode:D
+\let:NwN \if_mode_horizontal:\tex_ifhmode:D
+\let:NwN \if_mode_vertical: \tex_ifvmode:D
+\let:NwN \if_mode_inner: \tex_ifinner:D
+\let:NwN \if_cs_exist:N \etex_ifdefined:D
+\let:NwN \if_cs_exist:w \etex_ifcsname:D
+\let:NwN \exp_after:NN \tex_expandafter:D
+\let:NwN \exp_not:N \tex_noexpand:D
+\let:NwN \exp_not:n \etex_unexpanded:D
\let:NwN \io_put_deferred:Nx \tex_write:D
\let:NwN \token_to_meaning:N \tex_meaning:D
\let:NwN \token_to_string:N \tex_string:D
\let:NwN \cs:w \tex_csname:D
\let:NwN \cs_end: \tex_endcsname:D
-\let:NwN \exp_after:NN \tex_expandafter:D
+\let:NwN \cs_meaning:N \tex_meaning:D
+\tex_def:D \cs_meaning:c #1{\exp_after:NN\cs_meaning:N\cs:w #1\cs_end:}
+\let:NwN \cs_show:N \tex_show:D
+\tex_def:D \cs_show:c #1{\exp_after:NN\cs_show:N\cs:w #1\cs_end:}
\let:NwN \scan_stop: \tex_relax:D
-\let:NwN \exp_not:N \tex_noexpand:D
\let:NwN \group_begin: \tex_begingroup:D
\let:NwN \group_end: \tex_endgroup:D
+\let:NwN \group_execute_after:N \tex_aftergroup:D
\let:NwN \the_internal:D \tex_the:D
\let:NwN \pref_global:D \tex_global:D
-\let:NwN\c_minus_one\m@ne
-\tex_chardef:D \c_one = 1\scan_stop:
+\let:NwN \pref_long:D \tex_long:D
+\let:NwN \pref_protected:D \etex_protected:D
+\let:NwN \def:Npn \tex_def:D
+\let:NwN \def:Npx \tex_edef:D
+\pref_protected:D \def:Npn \def_long:Npn {\pref_long:D \def:Npn}
+\pref_protected:D \def:Npn \def_long:Npx {\pref_long:D \def:Npx}
+\pref_protected:D \def:Npn \def_protected:Npn {\pref_protected:D \def:Npn}
+\pref_protected:D \def:Npn \def_protected:Npx {\pref_protected:D \def:Npx}
+\def_protected:Npn \def_protected_long:Npn {
+ \pref_protected:D \pref_long:D \def:Npn
+}
+\def_protected:Npn \def_protected_long:Npx {
+ \pref_protected:D \pref_long:D \def:Npx
+}
+\let:NwN \gdef:Npn \tex_gdef:D
+\let:NwN \gdef:Npx \tex_xdef:D
+\def_protected:Npn \gdef_long:Npn {\pref_long:D \gdef:Npn}
+\def_protected:Npn \gdef_long:Npx {\pref_long:D \gdef:Npx}
+\def_protected:Npn \gdef_protected:Npn {\pref_protected:D \gdef:Npn}
+\def_protected:Npn \gdef_protected:Npx {\pref_protected:D \gdef:Npx}
+\def_protected:Npn \gdef_protected_long:Npn {
+ \pref_protected:D \pref_long:D \gdef:Npn
+}
+\def_protected:Npn \gdef_protected_long:Npx {
+ \pref_protected:D \pref_long:D \gdef:Npx
+}
+\def:Npn \c_true {00}
+\def:Npn \c_false {01}
+\let:NwN \c_minus_one\m@ne
\tex_chardef:D \c_sixteen = 16\scan_stop:
-\tex_mathchardef:D \c_two_hundred_fifty_six = 256\scan_stop:
\def:Npn \io_put_log:x{
\tex_immediate:D\io_put_deferred:Nx \c_minus_one }
\def:Npn \io_put_term:x{
\tex_immediate:D\io_put_deferred:Nx \c_sixteen }
-\def:Npn\err_latex_bug:n#1{
+\def:Npn\err_latex_bug:x#1{
\io_put_term:x{This~is~a~LaTeX~bug!~Check~coding!}\tex_errmessage:D{#1}}
\def:Npn \cs_record_meaning:N#1{}
+\def_long:Npn \use_none:n #1{}
+\def_long:Npn \use_arg_i:n #1{#1}
\def:Npn \chk_new_cs:N #1{
- \if_meaning:NN #1\c_undefined
- \else:
- \if_meaning:NN #1\scan_stop:
- \else:
- \err_latex_bug:n {Command~name~`\token_to_string:N #1'~
- already~defined!~
- Current~meaning:~\token_to_meaning:N #1
- }
- \fi:
- \fi:
- \cs_record_meaning:N#1
- \io_put_log:x{Defining~\token_to_string:N #1~on~
- line~\tex_the:D \tex_inputlineno:D}
- }
-\def:Npn \cs_exist_p:N #1{
- \if:w \cs_free_p:N #1
+ \if:w \cs_if_free_p:N #1
+ \exp_after:NN \use_none:n
+ \else:
+ \exp_after:NN \use_arg_i:n
+ \fi:
+ {
+ \err_latex_bug:x {Command~name~`\token_to_string:N #1'~
+ already~defined!~
+ Current~meaning:~\token_to_meaning:N #1
+ }
+ }
+ \cs_record_meaning:N#1
+ \io_put_log:x{Defining~\token_to_string:N #1~on~
+ line~\tex_the:D \tex_inputlineno:D}
+}
+\def:Npn \cs_if_exist_p:N #1{
+ \if:w \cs_if_free_p:N #1
\c_false
\else:
\c_true \fi:}
-\def:Npn \chk_exist_cs:N #1 {
- \if:w \cs_exist_p:N #1
+\def:Npn \chk_if_exist_cs:N #1 {
+ \if:w \cs_if_exist_p:N #1
\else:
- \err_latex_bug:n{Command~ `\token_to_string:N #1'~
+ \err_latex_bug:x{Command~ `\token_to_string:N #1'~
not~ yet~ defined!}
\fi:}
-\def:Npn \cs_free_p:N #1{
- \if_meaning:NN#1\c_undefined
- \if:w\cs_eq_p:NN #1\c_undefined \c_false
- \else: \c_true \fi:
- \else:
+\def:Npn \chk_if_exist_cs:c #1 {
+ \exp_after:NN \chk_if_exist_cs:N \cs:w #1\cs_end: }
+\def:Npn \cs_if_free_p:N #1{
+ \if_cs_exist:N #1
\if_meaning:NN#1\scan_stop:
- \if:w\cs_eq_p:NN #1\scan_stop: \c_false
- \else: \c_true \fi:
- \else:
- \c_false \fi:\fi:}
-\tex_long:D\def:Npn \let:NN #1{
- \let:NwN #1=~}
-\def:Npn\let:cN #1 {\exp_after:NN\let:NwN\cs:w#1\cs_end:=~}
-\def:Npn\let:Nc{\exp_args:NNc\let:NN}
-\def:Npn\let:cc{\exp_args:Ncc\let:NN}
-\def:Npn \def_new:Npn #1{\chk_new_cs:N #1
+ \if:w\cs_if_eq_name_p:NN #1\scan_stop:
+ \c_false \else: \c_true \fi:
+ \else:
+ \c_false
+ \fi:
+ \else:
+ \if:w \cs_if_eq_name_p:NN #1\c_undefined
+ \c_false \else: \c_true \fi:
+ \fi:
+}
+\let:NwN \cs_free_p:N \cs_if_free_p:N
+\def:Npn \str_if_eq_p:nn #1#2{
+ \str_if_eq_p_aux:w #1\scan_stop:\\#2\scan_stop:\\
+}
+\def:Npn \str_if_eq_p_aux:w #1#2\\#3#4\\{
+ \if_meaning:NN#1#3
+ \if_meaning:NN#1\scan_stop:\c_true \else:
+ \if_meaning:NN#3\scan_stop:\c_false \else:
+ \str_if_eq_p_aux:w #2\\#4\\\fi:\fi:
+ \else:\c_false \fi:}
+\def_long:Npn \cs_if_eq_name_p:NN #1#2{
+ \exp_after:NN\exp_after:NN
+ \exp_after:NN\str_if_eq_p_aux:w
+ \exp_after:NN\token_to_string:N
+ \exp_after:NN#1
+ \exp_after:NN\scan_stop:
+ \exp_after:NN\\
+ \token_to_string:N#2\scan_stop:\\}
+\def:Npn \str_if_eq_var_p:nf#1{
+ \if:w \tex_number:D\str_if_eq_var_start:nnN{}{}#1\scan_stop:
+}
+\def:Npn\str_if_eq_var_start:nnN#1#2#3{
+ \if:w#3\scan_stop:\exp_after:NN\str_if_eq_var_stop:w\fi:
+ \str_if_eq_var_start:nnN{\if:w#3#1}{#2\fi:}
+}
+\def:Npn\str_if_eq_var_stop:w\str_if_eq_var_start:nnN#1#2#3{
+ #1#3\scan_stop:'#213~\c_true\else:\c_false\fi:
+}
+\def_protected:Npn \def_new:Npn #1{\chk_new_cs:N #1
\def:Npn #1}
-\def:Npn \def_new:Npx #1{\chk_new_cs:N #1
+\def_protected:Npn \def_new:Npx #1{\chk_new_cs:N #1
\def:Npx #1}
+\def_protected:Npn \def_long_new:Npn #1{\chk_new_cs:N #1
+ \def_long:Npn #1}
+\def_protected:Npn \def_long_new:Npx #1{\chk_new_cs:N #1
+ \def_long:Npx #1}
+\def_protected:Npn \def_protected_new:Npn #1{\chk_new_cs:N #1
+ \def_protected:Npn #1}
+\def_protected:Npn \def_protected_new:Npx #1{\chk_new_cs:N #1
+ \def_protected:Npx #1}
+\def_protected:Npn \def_protected_long_new:Npn #1{\chk_new_cs:N #1
+ \def_protected_long:Npn #1}
+\def_protected:Npn \def_protected_long_new:Npx #1{\chk_new_cs:N #1
+ \def_protected_long:Npx #1}
+\def_protected_new:Npn \gdef_new:Npn #1{\chk_new_cs:N #1
+ \gdef:Npn #1}
+\def_protected_new:Npn \gdef_new:Npx #1{\chk_new_cs:N #1
+ \gdef:Npx #1}
+\def_protected_new:Npn \gdef_long_new:Npn #1{\chk_new_cs:N #1
+ \gdef_long:Npn #1}
+\def_protected_new:Npn \gdef_long_new:Npx #1{\chk_new_cs:N #1
+ \gdef_long:Npx #1}
+\def_protected_new:Npn \gdef_protected_new:Npn #1{\chk_new_cs:N #1
+ \gdef_protected:Npn #1}
+\def_protected_new:Npn \gdef_protected_new:Npx #1{\chk_new_cs:N #1
+ \gdef_protected:Npx #1}
+\def_protected_new:Npn \gdef_protected_long_new:Npn #1{\chk_new_cs:N #1
+ \gdef_protected_long:Npn #1}
+\def_protected_new:Npn \gdef_protected_long_new:Npx #1{\chk_new_cs:N #1
+ \gdef_protected_long:Npx #1}
+\def_new:Npn \def:cpn #1{\exp_after:NN \def:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def:cpx #1{\exp_after:NN \def:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef:cpn #1{\exp_after:NN \gdef:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef:cpx #1{\exp_after:NN \gdef:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_new:cpn #1{\exp_after:NN \def_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_new:cpx #1{\exp_after:NN \def_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_new:cpn #1{\exp_after:NN \gdef_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_new:cpx #1{\exp_after:NN \gdef_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_long:cpn #1{\exp_after:NN \def_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_long:cpx #1{
+ \exp_after:NN\def_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \gdef_long:cpn #1{
+ \exp_after:NN \gdef_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_long:cpx #1{
+ \exp_after:NN\gdef_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \def_long_new:cpn #1{
+ \exp_after:NN \def_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_long_new:cpx #1{
+ \exp_after:NN \def_long_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_long_new:cpn #1{
+ \exp_after:NN \gdef_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_long_new:cpx #1{
+ \exp_after:NN \gdef_long_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_protected:cpn #1{
+ \exp_after:NN \def_protected:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected:cpx #1{
+ \exp_after:NN\def_protected:Npx\cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected:cpn #1{
+ \exp_after:NN \gdef_protected:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected:cpx #1{
+ \exp_after:NN\gdef_protected:Npx\cs:w #1\cs_end:}
+\def_new:Npn \def_protected_new:cpn #1{
+ \exp_after:NN \def_protected_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_new:cpx #1{
+ \exp_after:NN \def_protected_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_new:cpn #1{
+ \exp_after:NN \gdef_protected_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_new:cpx #1{
+ \exp_after:NN \gdef_protected_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long:cpn #1{
+ \exp_after:NN \def_protected_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long:cpx #1{
+ \exp_after:NN\def_protected_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long:cpn #1{
+ \exp_after:NN \gdef_protected_long:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long:cpx #1{
+ \exp_after:NN\gdef_protected_long:Npx\cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long_new:cpn #1{
+ \exp_after:NN \def_protected_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \def_protected_long_new:cpx #1{
+ \exp_after:NN \def_protected_long_new:Npx \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long_new:cpn #1{
+ \exp_after:NN \gdef_protected_long_new:Npn \cs:w #1\cs_end:}
+\def_new:Npn \gdef_protected_long_new:cpx #1{
+ \exp_after:NN \gdef_protected_long_new:Npx \cs:w #1\cs_end:}
+\def_new:cpn {def_aux_0:NNn} #1#2 {#1 #2 }
+\def_new:cpn {def_aux_1:NNn} #1#2 {#1 #2 ##1 }
+\def_new:cpn {def_aux_2:NNn} #1#2 {#1 #2 ##1##2 }
+\def_new:cpn {def_aux_3:NNn} #1#2 {#1 #2 ##1##2##3 }
+\def_new:cpn {def_aux_4:NNn} #1#2 {#1 #2 ##1##2##3##4 }
+\def_new:cpn {def_aux_5:NNn} #1#2 {#1 #2 ##1##2##3##4##5 }
+\def_new:cpn {def_aux_6:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6 }
+\def_new:cpn {def_aux_7:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6##7 }
+\def_new:cpn {def_aux_8:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6##7##8 }
+\def_new:cpn {def_aux_9:NNn} #1#2 {#1 #2 ##1##2##3##4##5##6##7##8##9 }
+\def_protected_long_new:Npn \def_aux:NNnn #1#2#3#4 {
+ \cs_if_really_exist:cTF {def_aux_\tex_the:D\etex_numexpr:D #3 :NNn}
+ {
+ \cs_use:c {def_aux_\tex_the:D\etex_numexpr:D #3 :NNn} #1 #2 {#4}
+ }
+ { \def_arg_number_error_msg:Nn #2{#3} }
+}
+\def_new:Npn \def_aux:Ncnn #1#2{
+ \exp_after:NN \def_aux:NNnn \exp_after:NN #1 \cs:w #2\cs_end:}
+\def_new:Npn \def_arg_number_error_msg:Nn #1#2 {
+ \err_latex_bug:x{
+ You're~ trying~ to~ define~ the~ command~ `\token_to_string:N #1'~
+ with~ \use_arg_i:n{\tex_the:D\etex_numexpr:D #2\scan_stop:} ~
+ arguments~ but~ I~ only~ allow~ 0-9~ arguments.~ I~ can~ probably~
+ not~ help~ you~ here
+ }
+}
+\def:cpn{def_aux_use_0_parameter:}{}
+\def:cpn{def_aux_use_1_parameter:}{{##1}}
+\def:cpn{def_aux_use_2_parameter:}{{##1}{##2}}
+\def:cpn{def_aux_use_3_parameter:}{{##1}{##2}{##3}}
+\def:cpn{def_aux_use_4_parameter:}{{##1}{##2}{##3}{##4}}
+\def:cpn{def_aux_use_5_parameter:}{{##1}{##2}{##3}{##4}{##5}}
+\def:cpn{def_aux_use_6_parameter:}{{##1}{##2}{##3}{##4}{##5}{##6}}
+\def:cpn{def_aux_use_7_parameter:}{{##1}{##2}{##3}{##4}{##5}{##6}{##7}}
+\def:cpn{def_aux_use_8_parameter:}{
+ {##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}}
+\def:cpn{def_aux_use_9_parameter:}{
+ {##1}{##2}{##3}{##4}{##5}{##6}{##7}{##8}{##9}}
+\def_new:Npn \def:NNn { \def_aux:NNnn \def:Npn }
+\def_new:Npn \def:NNx { \def_aux:NNnn \def:Npx }
+\def_new:Npn \def:cNn { \def_aux:Ncnn \def:Npn }
+\def_new:Npn \def:cNx { \def_aux:Ncnn \def:Npx }
+\def_new:Npn \gdef:NNn { \def_aux:NNnn \gdef:Npn }
+\def_new:Npn \gdef:NNx { \def_aux:NNnn \gdef:Npx }
+\def_new:Npn \gdef:cNn { \def_aux:Ncnn \gdef:Npn }
+\def_new:Npn \gdef:cNx { \def_aux:Ncnn \gdef:Npx }
+\def_new:Npn \def_new:NNn { \def_aux:NNnn \def_new:Npn }
+\def_new:Npn \def_new:NNx { \def_aux:NNnn \def_new:Npx }
+\def_new:Npn \def_new:cNn { \def_aux:Ncnn \def_new:Npn }
+\def_new:Npn \def_new:cNx { \def_aux:Ncnn \def_new:Npx }
+\def_new:Npn \gdef_new:NNn { \def_aux:NNnn \gdef_new:Npn }
+\def_new:Npn \gdef_new:NNx { \def_aux:NNnn \gdef_new:Npx }
+\def_new:Npn \gdef_new:cNn { \def_aux:Ncnn \gdef_new:Npn }
+\def_new:Npn \gdef_new:cNx { \def_aux:Ncnn \gdef_new:Npx }
+\def_new:Npn \def_long:NNn { \def_aux:NNnn \def_long:Npn }
+\def_new:Npn \def_long:NNx { \def_aux:NNnn \def_long:Npx }
+\def_new:Npn \def_long:cNn { \def_aux:Ncnn \def_long:Npn }
+\def_new:Npn \def_long:cNx { \def_aux:Ncnn \def_long:Npx }
+\def_new:Npn \gdef_long:NNn { \def_aux:NNnn \gdef_long:Npn }
+\def_new:Npn \gdef_long:NNx { \def_aux:NNnn \gdef_long:Npx }
+\def_new:Npn \gdef_long:cNn { \def_aux:Ncnn \gdef_long:Npn }
+\def_new:Npn \gdef_long:cNx { \def_aux:Ncnn \gdef_long:Npx }
+\def_new:Npn \def_long_new:NNn { \def_aux:NNnn \def_long_new:Npn }
+\def_new:Npn \def_long_new:NNx { \def_aux:NNnn \def_long_new:Npx }
+\def_new:Npn \def_long_new:cNn { \def_aux:Ncnn \def_long_new:Npn }
+\def_new:Npn \def_long_new:cNx { \def_aux:Ncnn \def_long_new:Npx }
+\def_new:Npn \gdef_long_new:NNn { \def_aux:NNnn \gdef_long_new:Npn }
+\def_new:Npn \gdef_long_new:NNx { \def_aux:NNnn \gdef_long_new:Npx }
+\def_new:Npn \gdef_long_new:cNn { \def_aux:Ncnn \gdef_long_new:Npn }
+\def_new:Npn \gdef_long_new:cNx { \def_aux:Ncnn \gdef_long_new:Npx }
+\def_new:Npn \def_protected:NNn { \def_aux:NNnn \def_protected:Npn }
+\def_new:Npn \def_protected:NNx { \def_aux:NNnn \def_protected:Npx }
+\def_new:Npn \def_protected:cNn { \def_aux:Ncnn \def_protected:Npn }
+\def_new:Npn \def_protected:cNx { \def_aux:Ncnn \def_protected:Npx }
+\def_new:Npn \gdef_protected:NNn { \def_aux:NNnn \gdef_protected:Npn }
+\def_new:Npn \gdef_protected:NNx { \def_aux:NNnn \gdef_protected:Npx }
+\def_new:Npn \gdef_protected:cNn { \def_aux:Ncnn \gdef_protected:Npn }
+\def_new:Npn \gdef_protected:cNx { \def_aux:Ncnn \gdef_protected:Npx }
+\def_new:Npn \def_protected_new:NNn { \def_aux:NNnn \def_protected_new:Npn }
+\def_new:Npn \def_protected_new:NNx { \def_aux:NNnn \def_protected_new:Npx }
+\def_new:Npn \def_protected_new:cNn { \def_aux:Ncnn \def_protected_new:Npn }
+\def_new:Npn \def_protected_new:cNx { \def_aux:Ncnn \def_protected_new:Npx }
+\def_new:Npn \gdef_protected_new:NNn { \def_aux:NNnn \gdef_protected_new:Npn }
+\def_new:Npn \gdef_protected_new:NNx { \def_aux:NNnn \gdef_protected_new:Npx }
+\def_new:Npn \gdef_protected_new:cNn { \def_aux:Ncnn \gdef_protected_new:Npn }
+\def_new:Npn \gdef_protected_new:cNx { \def_aux:Ncnn \gdef_protected_new:Npx }
+\def_new:Npn \def_protected_long:NNn { \def_aux:NNnn \def_protected_long:Npn }
+\def_new:Npn \def_protected_long:NNx { \def_aux:NNnn \def_protected_long:Npx }
+\def_new:Npn \def_protected_long:cNn { \def_aux:Ncnn \def_protected_long:Npn }
+\def_new:Npn \def_protected_long:cNx { \def_aux:Ncnn \def_protected_long:Npx }
+\def_new:Npn \gdef_protected_long:NNn { \def_aux:NNnn \gdef_protected_long:Npn }
+\def_new:Npn \gdef_protected_long:NNx { \def_aux:NNnn \gdef_protected_long:Npx }
+\def_new:Npn \gdef_protected_long:cNn { \def_aux:Ncnn \gdef_protected_long:Npn }
+\def_new:Npn \gdef_protected_long:cNx { \def_aux:Ncnn \gdef_protected_long:Npx }
+\def_new:Npn \def_protected_long_new:NNn {
+ \def_aux:NNnn \def_protected_long_new:Npn }
+\def_new:Npn \def_protected_long_new:NNx {
+ \def_aux:NNnn \def_protected_long_new:Npx }
+\def_new:Npn \def_protected_long_new:cNn {
+ \def_aux:Ncnn \def_protected_long_new:Npn }
+\def_new:Npn \def_protected_long_new:cNx {
+ \def_aux:Ncnn \def_protected_long_new:Npx }
+\def_new:Npn \gdef_protected_long_new:NNn {
+ \def_aux:NNnn \gdef_protected_long_new:Npn }
+\def_new:Npn \gdef_protected_long_new:NNx {
+ \def_aux:NNnn \gdef_protected_long_new:Npx }
+\def_new:Npn \gdef_protected_long_new:cNn {
+ \def_aux:Ncnn \gdef_protected_long_new:Npn }
+\def_new:Npn \gdef_protected_long_new:cNx {
+ \def_aux:Ncnn \gdef_protected_long_new:Npx }
+\def_protected_long_new:Npn \let:NN #1{
+ \let:NwN #1=~}
+\def_new:Npn\let:cN #1 {\exp_after:NN\let:NN\cs:w#1\cs_end:}
+\def_new:Npn\let:Nc{\exp_args:NNc\let:NN}
+\def_new:Npn\let:cc{\exp_args:Ncc\let:NN}
\def_new:Npn \let_new:NN #1{\chk_new_cs:N #1
\let:NN #1}
-\def_new:Npn \def:cpn #1{\exp_after:NN
- \def:Npn
- \cs:w #1\cs_end:}
-\def_new:Npn \def:cpx #1{\exp_after:NN
- \def:Npx
- \cs:w #1\cs_end:}
-\def_new:Npn \def_new:cpn #1{\exp_after:NN
- \def_new:Npn
- \cs:w #1\cs_end:}
-\def_new:Npn \def_new:cpx #1{\exp_after:NN
- \def_new:Npx
- \cs:w #1\cs_end:}
-\def_new:Npn \def:No{\exp_args:NNo\def:Npn}
-\def_new:Npn \def_long:Npn {\tex_long:D\def:Npn}
-\def_new:Npn \def_long_new:Npn #1{\chk_new_cs:N #1
- \def_long:Npn #1}
-\def_new:Npn \def_long:cpn #1{\exp_after:NN
- \def_long:Npn
- \cs:w #1\cs_end:}
-\def_new:Npn \def_long:Npx {\tex_long:D\def:Npx}
-\def_new:Npn \glet:NN {\tex_global:D \let:NN}
+\def_new:Npn \let_new:cN {\exp_args:Nc \let_new:NN}
+\def_new:Npn \let_new:Nc {\exp_args:NNc \let_new:NN}
+\def_new:Npn \let_new:cc {\exp_args:Ncc \let_new:NN}
+\def_protected_new:Npn \glet:NN {\pref_global:D \let:NN}
+\def_protected_new:Npn \glet:Nc {\exp_args:NNc \glet:NN}
+\def_protected_new:Npn \glet:cN {\exp_args:Nc \glet:NN}
+\def_new:Npn \glet:cc {\exp_args:Ncc \glet:NN}
\def_new:Npn \glet_new:NN #1{\chk_new_cs:N #1
\tex_global:D\let:NN #1}
-\def_new:Npn \gdef_new:Npn #1{\chk_new_cs:N #1
- \gdef:Npn #1}
-\def_new:Npn \gdef:cpn {\tex_global:D \def:cpn}
-\def_new:Npn \gdef:cpx {\tex_global:D \def:cpx}
+\def_new:Npn \glet_new:cN {\exp_args:Nc \glet_new:NN}
+\def_new:Npn \glet_new:Nc {\exp_args:NNc \glet_new:NN}
+\def_new:Npn \glet_new:cc {\exp_args:Ncc \glet_new:NN}
+\def_new:Npn \def:No{\exp_args:NNo\def:Npn}
\def_new:Npn \gdef:No {\exp_args:NNo\gdef:Npn}
-
-\def_new:Npn \gdef_long:Npn {\tex_long:D\gdef:Npn}
-\def_new:Npn \gdef_long:Npx {\tex_long:D\gdef:Npx}
-\def_new:Npn \gfuturelet:NNN{\tex_global:D \let_peek_after:NNN}
-\def_long_new:Npn \cs_free:NTF #1{\if:w\cs_free_p:N #1
- \exp_after:NN \use_choice_i:nn \else:
- \exp_after:NN \use_choice_ii:nn \fi:}
-\def_long_new:Npn \cs_free:NT #1{\if:w\cs_free_p:N #1
- \exp_after:NN \use:n \else:
- \exp_after:NN \use_none:n \fi:}
-\def_long_new:Npn \cs_free:NF #1{\if:w\cs_free_p:N #1
- \exp_after:NN \use_none:n \else:
- \exp_after:NN \use:n \fi:}
-\def_long_new:Npn \cs_free:cTF #1{
- \exp_after:NN
- \if_meaning:NN
- \cs:w#1\cs_end:
- \scan_stop:
- \exp_after:NN \use_choice_i:nn
- \else:
- \exp_after:NN \use_choice_ii:nn
- \fi:}
-\def_long_new:Npn \cs_free:cF #1{\exp_after:NN
- \if_meaning:NN \cs:w#1\cs_end: \scan_stop:
- \exp_after:NN \use_none:nn \fi: \use:n}
-\def_long_new:Npn \cs_free:cT #1{\exp_after:NN
- \if_meaning:NN \cs:w#1\cs_end: \scan_stop:
- \else:
- \exp_after:NN \use_none:nn \fi: \use:n}
-\def_new:Npn \gundefine:N #1{\glet:NN #1\c_undefined}
-\def_long_new:Npn \use_none:n #1{}
-\def_long_new:Npn \use_none:nn #1#2{}
-\def_long_new:Npn \use_none:nnn #1{\use_none:nn}
-\def_long_new:Npn \use_none:nnnn
- {\exp_after:NN\use_none:nn \use_none:nn}
-\def_long_new:Npn \use:n #1{#1}
+\def_long_new:Npn \def_test_function_aux:Nnnn #1#2#3#4{
+ #1 {#2TF} #3 {#4
+ \exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}
+ #1 {#2T} #3 {#4
+ \else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}
+ #1 {#2F} #3 {#4
+ \exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
+\def_long_new:Npn \def_test_function_aux:Nnnx #1#2#3#4{
+ #1 {#2TF} #3 {#4
+ \exp_not:n{\exp_after:NN\use_arg_i:nn\else:\exp_after:NN\use_arg_ii:nn\fi:}}
+ #1 {#2T} #3 {#4
+ \exp_not:n{\else:\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}
+ #1 {#2F} #3 {#4
+ \exp_not:n{\exp_after:NN\use_none:nn\fi:\use_arg_i:n}}}
+\def_long_new:Npn \def_test_function:npn #1#2#{
+ \def_test_function_aux:Nnnn \def:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_test_function:npx #1#2#{
+ \def_test_function_aux:Nnnx \def:cpx {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function:npn #1#2#{
+ \def_test_function_aux:Nnnn \def_long:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function:npx #1#2#{
+ \def_test_function_aux:Nnnx \def_long:cpx {#1}{#2}
+}
+\def_long_new:Npn \def_test_function_new:npn #1#2#{
+ \def_test_function_aux:Nnnn \def_new:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function_new:npn #1#2#{
+ \def_test_function_aux:Nnnn \def_long_new:cpn {#1}{#2}
+}
+\def_long_new:Npn \def_test_function_new:npx #1#2#{
+ \def_test_function_aux:Nnnx \def_new:cpx {#1}{#2}
+}
+\def_long_new:Npn \def_long_test_function_new:npx #1#2#{
+ \def_test_function_aux:Nnnx \def_long_new:cpx {#1}{#2}
+}
+\def_long_test_function_new:npn {cs_if_free:N}#1{\if:w\cs_if_free_p:N #1}
+\let:NN \cs_free:NTF \cs_if_free:NTF
+\let:NN \cs_free:NT \cs_if_free:NT
+\let:NN \cs_free:NF \cs_if_free:NF
+\def_long_test_function_new:npn {cs_if_free:c}#1{
+ \exp_after:NN \if_meaning:NN \cs:w#1\cs_end: \scan_stop:}
+\let:NN \cs_free:cTF \cs_if_free:cTF
+\let:NN \cs_free:cT \cs_if_free:cT
+\let:NN \cs_free:cF \cs_if_free:cF
+\def_long_test_function_new:npn {cs_if_really_free:c}#1{
+ \reverse_if:N\if_cs_exist:w #1\cs_end:}
+\let:NN \cs_really_free:cTF \cs_if_really_free:cTF
+\let:NN \cs_really_free:cT \cs_if_really_free:cT
+\let:NN \cs_really_free:cF \cs_if_really_free:cF
+\def_long_test_function_new:npn {cs_if_exist:N}#1{\if:w\cs_if_exist_p:N #1}
+\def_long_test_function_new:npn {cs_if_exist:c}#1{
+ \exp_after:NN\reverse_if:N
+ \exp_after:NN \if_meaning:NN \cs:w#1\cs_end: \scan_stop:}
+\def_long_test_function_new:npn {cs_if_really_exist:c}#1{
+ \if_cs_exist:w #1\cs_end:}
+\def_new:Npn \cs_gundefine:N #1{\glet:NN #1\c_undefined}
+\def_test_function_new:npn {engine_aleph:}{\if_cs_exist:N \aleph_textdir:D}
\def_new:Npn \use:c #1{\cs:w #1\cs_end:}
-
+\def_new:Npn \cs_use:c #1 { \cs:w#1\cs_end: }
\def_new:Npn \use:cc #1#2
{\cs:w #1\exp_after:NN\cs_end:\cs:w #2\cs_end:}
-\def_long_new:Npn \use_choice_i:nn #1#2{#1}
-\def_long_new:Npn \use_choice_ii:nn #1#2{#2}
-\def_long_new:Npn\use_choice_i:nnn#1#2#3{#1}
-\def_long_new:Npn\use_choice_ii:nnn#1#2#3{#2}
-\def_long_new:Npn\use_choice_iii:nnn#1#2#3{#3}
+\def_long_new:Npn \use_arg_i:nn #1#2{#1}
+\def_long_new:Npn \use_arg_ii:nn #1#2{#2}
+\def_long_new:NNn \use_arg_i:nnn 3{#1}
+\def_long_new:NNn \use_arg_ii:nnn 3{#2}
+\def_long_new:NNn \use_arg_iii:nnn 3{#3}
+\def_long_new:NNn \use_arg_i:nnnn 4{#1}
+\def_long_new:NNn \use_arg_ii:nnnn 4{#2}
+\def_long_new:NNn \use_arg_iii:nnnn 4{#3}
+\def_long_new:NNn \use_arg_iv:nnnn 4{#4}
+\def_long_new:NNn\use_arg_i_ii:nn 2{#1#2}
+\def_long_new:Npn \use_none_delimit_by_q_nil:w #1\q_nil{}
+\def_long_new:Npn \use_none_delimit_by_q_stop:w #1\q_stop{}
+\def_long_new:Npn \use_arg_i_delimit_by_q_nil:nw #1#2\q_nil{#1}
+\def_long_new:Npn \use_arg_i_delimit_by_q_stop:nw #1#2\q_stop{#1}
+\def_long_new:Npn \use_arg_i_after_fi:nw #1\fi:{\fi: #1}
+\def_long_new:Npn \use_arg_i_after_else:nw #1\else:#2\fi:{\fi: #1}
+\def_long_new:Npn \use_arg_i_after_or:nw #1\or: #2\fi: {\or:\fi:#1}
+\def_long_new:NNn \use_none:nn 2{}
+\def_long_new:NNn \use_none:nnn 3{}
+\def_long_new:NNn \use_none:nnnn 4{}
+\def_long_new:NNn \use_none:nnnnn 5{}
+\def_long_new:NNn \use_none:nnnnnn 6{}
+\def_long_new:NNn \use_none:nnnnnnn 7{}
+\def_long_new:NNn \use_none:nnnnnnnn 8{}
+\def_long_new:NNn \use_none:nnnnnnnnn 9{}
\def_new:Npn \gtmp:w {}
\def_new:Npn \tmp:w {}
\def_new:Npn \use_noop: {}
\def_new:Npn \cs_to_str:N {\exp_after:NN\use_none:n \token_to_string:N}
-\def_new:Npn \tlist_eq:nnTF #1#2{
- \tlp_gset:Nn \g_testa_tlp {#1}
- \tlp_gset:Nn \g_testb_tlp {#2}
- \if_meaning:NN\g_testa_tlp \g_testb_tlp
- \exp_after:NN\use_choice_i:nn \else:
- \exp_after:NN\use_choice_ii:nn \fi:}
-\def_new:Npn \tlist_eq:onTF {\exp_args:No \tlist_eq:nnTF}
-\def_new:Npn \tlist_empty:nTF #1{\tlp_gset:Nn \g_testa_tlp {#1}
- \if_meaning:NN\g_testa_tlp \c_empty_tlp
- \exp_after:NN \use_choice_i:nn \else:
- \exp_after:NN \use_choice_ii:nn \fi:}
-\def_new:Npn \tlist_empty:nF #1{\tlp_gset:Nn \g_testa_tlp {#1}
- \if_meaning:NN\g_testa_tlp \c_empty_tlp
- \exp_after:NN \use_none:nn \fi: \use:n}
-\def_new:Npn \str_eq_p:nn #1#2{\str_eq_p_aux:w #1\scan_stop:\\#2\scan_stop:\\}
-\def_new:Npn \str_eq_p_aux:w #1#2\\#3#4\\{
- \if_meaning:NN#1#3
- \if_meaning:NN#1\scan_stop:\c_true \else:
- \if_meaning:NN#3\scan_stop:\c_false \else:
- \str_eq_p_aux:w #2\\#4\\\fi:\fi:
- \else:\c_false \fi:}
-\def:Npn \cs_eq_p:NN #1#2{
- \exp_after:NN\exp_after:NN
- \exp_after:NN\str_eq_p_aux:w
- \exp_after:NN\token_to_string:N
- \exp_after:NN#1
- \exp_after:NN\scan_stop:
- \exp_after:NN\\
- \token_to_string:N#2\scan_stop:\\}
+\def_test_function_new:npn {cs_if_eq:NN} #1#2{\if_meaning:NN #1#2}
+\def_new:Npn \cs_if_eq:cNTF {\exp_args:Nc \cs_if_eq:NNTF}
+\def_new:Npn \cs_if_eq:cNT {\exp_args:Nc \cs_if_eq:NNT}
+\def_new:Npn \cs_if_eq:cNF {\exp_args:Nc \cs_if_eq:NNF}
+\def_new:Npn \cs_if_eq:NcTF {\exp_args:NNc \cs_if_eq:NNTF}
+\def_new:Npn \cs_if_eq:NcT {\exp_args:NNc \cs_if_eq:NNT}
+\def_new:Npn \cs_if_eq:NcF {\exp_args:NNc \cs_if_eq:NNF}
+\def_new:Npn \cs_if_eq:ccTF {\exp_args:Ncc \cs_if_eq:NNTF}
+\def_new:Npn \cs_if_eq:ccT {\exp_args:Ncc \cs_if_eq:NNT}
+\def_new:Npn \cs_if_eq:ccF {\exp_args:Ncc \cs_if_eq:NNF}
\def_new:Npn\file_not_found:nTF #1#2#3{\IfFileExists{#1}{#3}{#2}}
-\def_new:Npn \c_true {TT}
-\def_new:Npn \c_false {TF}
-
%%
%%
%% End of file `l3basics.sty'.