From 134349701bddf7cbbacf6030c6b9f9838aff96fa Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 23 Jul 2012 17:15:00 +0000 Subject: l3kernel 3990 (17jul12) git-svn-id: svn://tug.org/texlive/trunk@27108 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/l3kernel/expl3.sty | 148 ++++++++++++++----------- 1 file changed, 81 insertions(+), 67 deletions(-) (limited to 'Master/texmf-dist/tex/latex/l3kernel/expl3.sty') diff --git a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty index f264342f725..7b8c68154f9 100644 --- a/Master/texmf-dist/tex/latex/l3kernel/expl3.sty +++ b/Master/texmf-dist/tex/latex/l3kernel/expl3.sty @@ -45,22 +45,23 @@ %% prior consultation with the LaTeX3 Project. %% %% ----------------------------------------------------------------------- -\RequirePackage{l3names}[2011/12/30] -\@ifpackagelater{l3names}{2011/12/30} +\RequirePackage{l3names}[2012/07/15] +\@ifpackagelater{l3names}{2012/07/15} {} - { + {% \PackageError{expl3}{Mismatched LaTeX3 packages detected.} - { + {% Please install an up to date version of l3kernel - using your TeX package manager or from CTAN.\\ \\ - Loading expl3 will abort! - } + using your TeX package manager or from CTAN.% + \MessageBreak \MessageBreak + Loading expl3 will abort!% + }% \endinput } \def\ExplFileName{expl3} \def\ExplFileDescription{L3 Experimental code bundle wrapper} -\def\ExplFileDate{2012/04/23} -\def\ExplFileVersion{3570} +\def\ExplFileDate{2012/07/16} +\def\ExplFileVersion{3990} \RequirePackage{etex} \reserveinserts{32} \ProvidesExplPackage @@ -75,129 +76,128 @@ \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 { native-drivers } \l@expl@native@drivers@bool -\ProcessOptions \relax \let \expl@create@bool@option \@undefined -\ifodd \l@expl@native@drivers@bool \relax -\else - \RequirePackage { color , graphics } -\fi -\RequirePackage{ l3basics, l3expan, l3tl } +\ProcessOptions \relax +\RequirePackage { l3basics, l3expan, l3tl } \ifodd \l@expl@check@declarations@bool \relax - \cs_new_protected:Npn \cs_check_exists:N #1 + \cs_new_protected:Npn \__cs_check_exists:N #1 { \cs_if_exist:NF #1 { - \msg_kernel_error:nnx { check } { non-declared-variable } + \__msg_kernel_error:nnx { check } { non-declared-variable } { \token_to_str:N #1 } } } \cs_set_protected:Npn \tl_set:Nn #1#2 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_set_nopar:Npx #1 { \exp_not:n {#2} } } \cs_set_protected:Npn \tl_set:Nx #1#2 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_set_nopar:Npx #1 {#2} } \cs_set_protected:Npn \tl_gset:Nn #1#2 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_gset_nopar:Npx #1 { \exp_not:n {#2} } } \cs_set_protected:Npn \tl_gset:Nx #1#2 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_gset_nopar:Npx #1 {#2} } \cs_set_protected:Npn \tl_set_eq:NN #1#2 { - \cs_check_exists:N #1 - \cs_check_exists:N #2 + \__cs_check_exists:N #1 + \__cs_check_exists:N #2 \cs_set_eq:NN #1 #2 } \cs_set_protected:Npn \tl_gset_eq:NN #1#2 { - \cs_check_exists:N #1 - \cs_check_exists:N #2 + \__cs_check_exists:N #1 + \__cs_check_exists:N #2 \cs_gset_eq:NN #1 #2 } \fi -\RequirePackage{ - l3seq, - l3int, - l3quark, - l3prg} +\RequirePackage { l3seq, l3int, l3quark, l3prg } \ifodd \l@expl@check@declarations@bool \relax \cs_set_protected:Npn \bool_set_true:N #1 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_set_eq:NN #1 \c_true_bool } \cs_set_protected:Npn \bool_set_false:N #1 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_set_eq:NN #1 \c_false_bool } \cs_set_protected:Npn \bool_gset_true:N #1 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_gset_eq:NN #1 \c_true_bool } \cs_set_protected:Npn \bool_gset_false:N #1 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_gset_eq:NN #1 \c_false_bool } \cs_set_protected:Npn \bool_set_eq:NN #1 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_set_eq:NN #1 } \cs_set_protected:Npn \bool_gset_eq:NN #1 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \cs_gset_eq:NN #1 } \cs_set_protected:Npn \bool_set:Nn #1#2 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \tex_chardef:D #1 = \bool_if_p:n {#2} } \cs_set_protected:Npn \bool_gset:Nn #1#2 { - \cs_check_exists:N #1 + \__cs_check_exists:N #1 \tex_global:D \tex_chardef:D #1 = \bool_if_p:n {#2} } \fi -\RequirePackage{ - l3clist, - l3token, - l3prop, - l3msg, - l3file, - l3skip, - l3keys, - l3fp, - l3box, - l3coffins, - l3color, - l3luatex -} +\RequirePackage + { + l3clist, + l3token, + l3prop, + l3msg, + l3file, + l3skip, + l3keys, + l3fp, + l3box, + l3coffins, + l3color, + l3luatex, + l3candidates + } \bool_if:nT { \l@expl@check@declarations@bool } { - \msg_kernel_new:nnnn { check } { non-declared-variable } + \__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: \\ - \ \ \tl_set:Nn ~ #1 ~ \iow_char:N \{ ~ ... ~ \iow_char:N \} \\ + \ \ \tl_set:Nn ~ #1 ~ \{ ~ ... ~ \} \\ without~first~having: \\ \ \ \tl_new:N ~ #1 \\ \\ LaTeX~will~create~the~variable~and~continue. } } +\AtBeginDocument + { + \cs_if_exist:NF \color + { \DeclareRobustCommand \color [2] [ ] { } } + } \bool_if:nTF { \l@expl@native@drivers@bool } { \xetex_if_engine:TF @@ -210,13 +210,20 @@ \file_input:n { l3dvips.def } \fi } - \AtBeginDocument - { - \cs_if_free:NT \color - { \DeclareRobustCommand \color [2] [ ] { } } - } } { + \tl_gput_left:Nn \@begindocumenthook { \RequirePackage { graphics } } + \__msg_kernel_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 } + \__msg_kernel_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:Nnn #1#2#3 @@ -224,8 +231,8 @@ \hbox_set:Nn #1 { \resizebox * - { \etex_dimexpr:D #2 \scan_stop: } - { \etex_dimexpr:D #3 \scan_stop: } + { \__dim_eval:w #2 \__dim_eval_end: } + { \__dim_eval:w #3 \__dim_eval_end: } { \box_use:N #1 } } } @@ -233,7 +240,7 @@ { \hbox_set:Nn #1 { - \resizebox * { ! } { \etex_dimexpr:D #2 \scan_stop: } + \resizebox * { ! } { \__dim_eval:w #2 \__dim_eval_end: } { \box_use:N #1 } } } @@ -241,16 +248,23 @@ { \hbox_set:Nn #1 { - \resizebox * { \etex_dimexpr:D #2 \scan_stop: } { ! } + \resizebox * { \__dim_eval:w #2 \__dim_eval_end: } { ! } { \box_use:N #1 } } } \cs_set_protected:Npn \box_scale:Nnn #1#2#3 - { \hbox_set:Nn #1 { \scalebox {#2} [#3] { \box_use:N #1 } } } + { + \hbox_set:Nn #1 + { + \exp_last_unbraced:Nx \scalebox + { { \fp_eval:n {#2} } [ \fp_eval:n {#3} ] } + { \box_use:N #1 } + } + } } \cs_set_protected_nopar:Npn \ExplSyntaxOn { - \bool_if:NF \l_expl_status_bool + \bool_if:NF \l__kernel_expl_bool { \cs_set_protected_nopar:Npx \ExplSyntaxOff { @@ -265,7 +279,7 @@ \char_set_catcode:nn { 124 } { \char_value_catcode:n { 124 } } \char_set_catcode:nn { 126 } { \char_value_catcode:n { 126 } } \tex_endlinechar:D = \tex_the:D \tex_endlinechar:D \scan_stop: - \bool_set_false:N \l_expl_status_bool + \bool_set_false:N \l__kernel_expl_bool \cs_set_protected_nopar:Npn \ExplSyntaxOff { } } } @@ -280,7 +294,7 @@ \char_set_catcode_other:n { 124 } % pipe \char_set_catcode_space:n { 126 } % tilde \tex_endlinechar:D = 32 \scan_stop: - \bool_set_true:N \l_expl_status_bool + \bool_set_true:N \l__kernel_expl_bool } \cs_set_protected_nopar:Npx \ExplSyntaxOff { -- cgit v1.2.3