diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/expl3/expl3.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/expl3/expl3.sty | 136 |
1 files changed, 133 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/expl3/expl3.sty b/Master/texmf-dist/tex/latex/expl3/expl3.sty index 684dab217f2..be01e6750ef 100644 --- a/Master/texmf-dist/tex/latex/expl3/expl3.sty +++ b/Master/texmf-dist/tex/latex/expl3/expl3.sty @@ -49,15 +49,15 @@ %% %% ----------------------------------------------------------------------- \RequirePackage{l3names} -\GetIdInfo$Id: expl3.dtx 1677 2009-11-02 08:24:04Z joseph $ +\GetIdInfo$Id: expl3.dtx 1866 2010-03-23 08:29:27Z joseph $ {L3 Experimental code bundle wrapper}% \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} +\RequirePackage{etex} \RequirePackage{ l3basics, l3expan, l3tl, - l3num, l3intexpr, l3quark, l3seq, @@ -66,9 +66,9 @@ l3prg, l3clist, l3token, - l3io, l3prop, l3msg, + l3io, l3skip, } \RequirePackage{ @@ -80,6 +80,136 @@ l3xref, l3file } +\bool_new:N \_l_expl_check_declarations_bool +\DeclareOption{check-declarations}{ + \bool_set_true:N \_l_expl_check_declarations_bool +} +\ProcessOptions \scan_stop: +\bool_if:NT \_l_expl_check_declarations_bool { + \msg_kernel_new:nnnn { check } { non-declared-variable } + { The~variable~#1~has~not~been~declared~\msg_line_context:. } + { + Checking~is~active,~and~you~have~tried~do~so~something~like: \\ + \c_space_tl \c_space_tl \tl_set:Nn #1 ~ + \iow_char:N \{ ~ ... ~ \iow_char:N \} \\ + without~first~having: \\ + \c_space_tl \c_space_tl \tl_new:N #1 \\ + \\ + LaTeX~will~create~the~variable~and~continue. + } + \cs_set_protected:Npn \_tl_check_exists:N #1 + { + \cs_if_exist:NF #1 + { + \msg_kernel_error:nnx { check } { non-declared-variable } + { \token_to_str:N #1 } + } + } + \cs_set_protected:Npn \tl_set:Nn #1#2 + { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_set:Nx #1#2 + { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 {#2} + } + \cs_set_protected:Npn \tl_gset:Nn #1#2 + { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_gset:Nx #1#2 + { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 {#2} + } + \cs_set_protected:Npn \tl_set_eq:NN #1#2 + { + \_tl_check_exists:N #1 + \_tl_check_exists:N #2 + \cs_set_eq:NN #1 #2 + } + \cs_set_protected:Npn \tl_gset_eq:NN #1#2 + { + \_tl_check_exists:N #1 + \_tl_check_exists:N #2 + \cs_gset_eq:NN #1 #2 + } + \cs_set_protected:Npn \tl_put_right:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_put_right:NV #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:V #2 } + } + \cs_set_protected:Npn \tl_put_right:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:v {#2} } + } + \cs_set_protected:Npn \tl_put_right:No #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 \exp_not:o {#2} } + } + \cs_set_protected:Npn \tl_put_right:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #1 #2 } + } + \cs_set_protected:Npn \tl_gput_right:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:n {#2} } + } + \cs_set_protected:Npn \tl_gput_right:NV #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:V #2 } + } + \cs_set_protected:Npn \tl_gput_right:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 \exp_not:v {#2} } + } + \cs_set_protected:Npn \tl_gput_right:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #1 #2 } + } + \cs_set_protected:Npn \tl_put_left:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:n {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:NV #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:V #2 \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:v {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:No #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { \exp_not:o {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_put_left:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_set_nopar:Npx #1 { #2 \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:Nn #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:n {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:NV #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:V #2 \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:Nv #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { \exp_not:v {#2} \exp_not:V #1 } + } + \cs_set_protected:Npn \tl_gput_left:Nx #1#2 { + \_tl_check_exists:N #1 + \cs_gset_nopar:Npx #1 { #2 \exp_not:V #1 } + } +} %% %% %% End of file `expl3.sty'. |