diff options
author | Karl Berry <karl@freefriends.org> | 2011-09-16 22:35:23 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-09-16 22:35:23 +0000 |
commit | b7f762397f5df2d732326713423e31e1bf91b903 (patch) | |
tree | 9dc78e4110734dc949a641156d369ec19ea78d8b /Master | |
parent | 49ffb8774d83e17edf47740577805287eb50fdb2 (diff) |
l3packages 2828 (15sep11)
git-svn-id: svn://tug.org/texlive/trunk@23982 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf | bin | 471937 -> 472930 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf | bin | 623140 -> 624855 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf | bin | 406523 -> 403915 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf | bin | 399740 -> 397726 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx | 1 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx | 14 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx | 98 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty | 14 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty | 62 |
12 files changed, 116 insertions, 82 deletions
diff --git a/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf b/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf Binary files differindex 695a6fe6cbc..0e65fa8e91b 100644 --- a/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf b/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf Binary files differindex 973eb787ff2..706b90faab4 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf b/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf Binary files differindex a497104aa30..c6c6b92e395 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf diff --git a/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf b/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf Binary files differindex f999d26d782..3d51074f037 100644 --- a/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf +++ b/Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf diff --git a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx index 7c9d21dd0ae..a716713b8e4 100644 --- a/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx +++ b/Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx @@ -36,7 +36,7 @@ % %<*driver|package> \RequirePackage{xparse} -\GetIdInfo$Id: l3keys2e.dtx 2729 2011-09-05 19:35:28Z joseph $ +\GetIdInfo$Id: l3keys2e.dtx 2828 2011-09-15 20:04:53Z joseph $ {LaTeX2e option processing using LaTeX3 keys} %</driver|package> %<*driver> @@ -137,7 +137,7 @@ % % A check to make sure that \pkg{expl3} is not too old % \begin{macrocode} -\@ifpackagelater { expl3 } { 2011/09/05 } +\@ifpackagelater { expl3 } { 2011/09/15 } { } { \PackageError { l3keys2e } { Support~package~l3kernel~too~old. } diff --git a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx index 371372fce44..fa930a4d16e 100644 --- a/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xfrac/xfrac.dtx @@ -904,6 +904,7 @@ } \xfrac_math:n { % THIS IS JUST WRONG! + \scan_align_safe_stop: \mode_if_math:TF { \tex_mskip:D \l_xfrac_slash_right_muskip } { \tex_hskip:D \l_xfrac_slash_right_sep_dim } diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx index ed6612bd94c..8ed92661c17 100644 --- a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx @@ -40,7 +40,7 @@ % %<*driver|package> \RequirePackage{expl3} -\GetIdInfo$Id: xparse.dtx 2729 2011-09-05 19:35:28Z joseph $ +\GetIdInfo$Id: xparse.dtx 2828 2011-09-15 20:04:53Z joseph $ {L3 Experimental document command parser} %</driver|package> %<*driver> @@ -623,7 +623,7 @@ % % A check to make sure that \pkg{expl3} is not too old % \begin{macrocode} -\@ifpackagelater { expl3 } { 2011/09/05 } +\@ifpackagelater { expl3 } { 2011/09/15 } { } { \PackageError { xparse } { Support~package~l3kernel~too~old. } @@ -1253,7 +1253,15 @@ { \exp_not:c { environment_end_ #1 _aux:N } \exp_not:o \l_xparse_args_tl - \group_end: + \exp_not:n + { + \if@endpe + \exp_after:wN \group_end: + \cs:w @endpetrue \exp_after:wN \cs_end: + \else + \exp_after:wN \group_end: + \fi + } } #3 } diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx index 8c9aa16c5c6..4f97e93aba4 100644 --- a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx +++ b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx @@ -40,7 +40,7 @@ % %<*driver|package> \RequirePackage{expl3} -\GetIdInfo$Id: xtemplate.dtx 2729 2011-09-05 19:35:28Z joseph $ +\GetIdInfo$Id: xtemplate.dtx 2828 2011-09-15 20:04:53Z joseph $ {L3 Experimental prototype document functions} %</driver|package> %<*driver> @@ -236,6 +236,8 @@ % not set explicitly. The \meta{default} should be of the correct % form to be accepted by the \meta{key type} of the \meta{key}: this % is not checked by the code. +% \end{function} +% % \begin{table} % \centering % \begin{tabular}{>{\ttfamily}ll} @@ -265,7 +267,6 @@ % \cs{DeclareTemplateInterface}.} % \label{tab:key-types} % \end{table} -% \end{function} % % \begin{function}{\KeyValue} % \begin{syntax} @@ -313,6 +314,14 @@ % may be included in the listing to indicate that the \meta{variable} % should be assigned globally. A full list of variable bindings is % given in Table~\ref{tab:key-vars}. +% +% The \meta{code} argument of \cs{DeclareTemplateCode} is used +% as the replacement text for the template when it is used, either +% directly or as an instance. This may therefore accept arguments +% |#1|, |#2|, \emph{etc}.~as detailed by the \meta{number of arguments} +% taken by the object type. +% \end{function} +% % \begin{table} % \centering % \begin{tabular}{>{\ttfamily}ll} @@ -344,12 +353,6 @@ % out a global assignment.} % \label{tab:key-vars} % \end{table} -% The \meta{code} argument of \cs{DeclareTemplateCode} is used -% as the replacement text for the template when it is used, either -% directly or as an instance. This may therefore accept arguments -% |#1|, |#2|, \emph{etc}.~as detailed by the \meta{number of arguments} -% taken by the object type. -% \end{function} % % \begin{function}{\AssignTemplateKeys} % \begin{syntax} @@ -658,7 +661,7 @@ % % A check to make sure that \pkg{expl3} is not too old % \begin{macrocode} -\@ifpackagelater { expl3 } { 2011/09/05 } +\@ifpackagelater { expl3 } { 2011/09/15 } { } { \PackageError { xtemplate } { Support~package~l3kernel~too~old. } @@ -1572,18 +1575,12 @@ \l_xtemplate_key_name_tl {#1} } { - \str_if_eq:noTF {#1} { \tl_head:w #1 \q_nil \q_stop } + \tl_if_single:nTF {#1} { - \cs_if_exist:NTF #1 - { - \prop_put:Non \l_xtemplate_vars_prop - \l_xtemplate_key_name_tl {#1} - } - { - \msg_error:nnx { xtemplate } - { variable-not-declared } - { \token_to_str:N #1 } - } + \cs_if_exist:NF #1 + { \xtemplate_create_variable:N #1 } + \prop_put:Non \l_xtemplate_vars_prop + \l_xtemplate_key_name_tl {#1} } { \tl_if_in:nnTF {#1} { global } @@ -1600,17 +1597,12 @@ { \tl_if_empty:nTF {#1} { - \str_if_eq:noTF {#2} { \tl_head:w #2 \q_nil \q_stop } + \tl_if_single:nTF {#2} { - \cs_if_exist:NTF #2 - { - \prop_put:Non \l_xtemplate_vars_prop - \l_xtemplate_key_name_tl { #1 global #2 } - } - { - \msg_error:nnx { xtemplate } - { variable-not-declared } { \token_to_str:N #2 } - } + \cs_if_exist:NF #2 + { \xtemplate_create_variable:N #2 } + \prop_put:Non \l_xtemplate_vars_prop + \l_xtemplate_key_name_tl { #1 global #2 } } { \msg_error:nnx { xtemplate } { bad-variable } @@ -1625,6 +1617,27 @@ % \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\xtemplate_create_variable:N} +% A shortcut to create non-declared variables. Some types need a name +% mapping, others can be used directly. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \xtemplate_create_variable:N #1 + { + \prg_case_str:onn \l_xtemplate_keytype_tl + { + { boolean } { \bool_new:N #1 } + { function } { \cs_new:Npn #1 { } } + { instance } { \cs_new_protected:Npn #1 { } } + { integer } { \int_new:N #1 } + { length } { \dim_new:N #1 } + { real } { \fp_new:N #1 } + { tokenlist } { \tl_new:N #1 } + } + { \use:c { \l_xtemplate_keytype_tl _ new:N } #1 } + } +% \end{macrocode} +% \end{macro} % % \begin{macro}{\xtemplate_implement_choices:n} % \begin{macro}[aux]{\xtemplate_implement_choices_default:} @@ -2218,14 +2231,11 @@ % \end{macro} % \end{macro} % \end{macro} -% +% % \begin{macro}{\xtemplate_assign_tokenlist:} -% \begin{macro}{\xtemplate_assign_commalist:} % \begin{macro}[aux]{\xtemplate_assign_tokenlist_aux:N} % Storing lists of tokens is easy: no complex calculations and no -% need to worry about numbers of arguments. The comma list version -% takes advantage of the low-level implementation of the variable type -% to keep down code duplication. +% need to worry about numbers of arguments. % \begin{macrocode} \cs_new_protected_nopar:Npn \xtemplate_assign_tokenlist: { @@ -2233,7 +2243,6 @@ { \xtemplate_assign_tokenlist_aux:N \tl_gset:Nn } { \xtemplate_assign_tokenlist_aux:N \tl_set:Nn } } -\cs_new_eq:NN \xtemplate_assign_commalist: \xtemplate_assign_tokenlist: \cs_new_protected_nopar:Npn \xtemplate_assign_tokenlist_aux:N #1 { \xtemplate_if_key_value:oT \l_xtemplate_value_tl @@ -2247,6 +2256,17 @@ % \end{macrocode} % \end{macro} % \end{macro} +% +% \begin{macro}{\xtemplate_assign_commalist:} +% Very similar for commas lists, so some code is shared. +% \begin{macrocode} +\cs_new_protected_nopar:Npn \xtemplate_assign_commalist: + { + \bool_if:NTF \l_xtemplate_global_bool + { \xtemplate_assign_tokenlist_aux:N \clist_gset:Nn } + { \xtemplate_assign_tokenlist_aux:N \clist_set:Nn } + } +% \end{macrocode} % \end{macro} % % \begin{macro}{\xtemplate_assign_variable:N} @@ -2686,12 +2706,6 @@ No~interface~has~been~declared~for~a~template~ '#2'~of~object~type~'#1'. } -\msg_new:nnnn { xtemplate } { variable-not-declared } - { The~variable~'#1'~has~not~been~declared. } - { - Before~declaring~an~instance,~all~of~the~required~variables~ - used~in~template~keys~must~be~created. - } % \end{macrocode} % % Information messages only have text: more text should not be needed. diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty index 3e50a253275..1066ded2139 100644 --- a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty @@ -47,11 +47,11 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{xparse} -\GetIdInfo$Id: l3keys2e.dtx 2729 2011-09-05 19:35:28Z joseph $ +\GetIdInfo$Id: l3keys2e.dtx 2828 2011-09-15 20:04:53Z joseph $ {LaTeX2e option processing using LaTeX3 keys} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\@ifpackagelater { expl3 } { 2011/09/05 } +\@ifpackagelater { expl3 } { 2011/09/15 } { } { \PackageError { l3keys2e } { Support~package~l3kernel~too~old. } diff --git a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty index d53d6d62bcb..700218206ca 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xfrac/xfrac.sty @@ -285,6 +285,7 @@ } \xfrac_math:n { % THIS IS JUST WRONG! + \scan_align_safe_stop: \mode_if_math:TF { \tex_mskip:D \l_xfrac_slash_right_muskip } { \tex_hskip:D \l_xfrac_slash_right_sep_dim } diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index 33bf7b331c4..79d2c8402d2 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty @@ -51,12 +51,12 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{expl3} -\GetIdInfo$Id: xparse.dtx 2729 2011-09-05 19:35:28Z joseph $ +\GetIdInfo$Id: xparse.dtx 2828 2011-09-15 20:04:53Z joseph $ {L3 Experimental document command parser} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \RequirePackage{expl3} -\@ifpackagelater { expl3 } { 2011/09/05 } +\@ifpackagelater { expl3 } { 2011/09/15 } { } { \PackageError { xparse } { Support~package~l3kernel~too~old. } @@ -351,7 +351,15 @@ { \exp_not:c { environment_end_ #1 _aux:N } \exp_not:o \l_xparse_args_tl - \group_end: + \exp_not:n + { + \if@endpe + \exp_after:wN \group_end: + \cs:w @endpetrue \exp_after:wN \cs_end: + \else + \exp_after:wN \group_end: + \fi + } } #3 } diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty index 1eb0de229bb..a5de89e8606 100644 --- a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty +++ b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty @@ -51,11 +51,11 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{expl3} -\GetIdInfo$Id: xtemplate.dtx 2729 2011-09-05 19:35:28Z joseph $ +\GetIdInfo$Id: xtemplate.dtx 2828 2011-09-15 20:04:53Z joseph $ {L3 Experimental prototype document functions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\@ifpackagelater { expl3 } { 2011/09/05 } +\@ifpackagelater { expl3 } { 2011/09/15 } { } { \PackageError { xtemplate } { Support~package~l3kernel~too~old. } @@ -524,18 +524,12 @@ \l_xtemplate_key_name_tl {#1} } { - \str_if_eq:noTF {#1} { \tl_head:w #1 \q_nil \q_stop } + \tl_if_single:nTF {#1} { - \cs_if_exist:NTF #1 - { - \prop_put:Non \l_xtemplate_vars_prop - \l_xtemplate_key_name_tl {#1} - } - { - \msg_error:nnx { xtemplate } - { variable-not-declared } - { \token_to_str:N #1 } - } + \cs_if_exist:NF #1 + { \xtemplate_create_variable:N #1 } + \prop_put:Non \l_xtemplate_vars_prop + \l_xtemplate_key_name_tl {#1} } { \tl_if_in:nnTF {#1} { global } @@ -552,17 +546,12 @@ { \tl_if_empty:nTF {#1} { - \str_if_eq:noTF {#2} { \tl_head:w #2 \q_nil \q_stop } + \tl_if_single:nTF {#2} { - \cs_if_exist:NTF #2 - { - \prop_put:Non \l_xtemplate_vars_prop - \l_xtemplate_key_name_tl { #1 global #2 } - } - { - \msg_error:nnx { xtemplate } - { variable-not-declared } { \token_to_str:N #2 } - } + \cs_if_exist:NF #2 + { \xtemplate_create_variable:N #2 } + \prop_put:Non \l_xtemplate_vars_prop + \l_xtemplate_key_name_tl { #1 global #2 } } { \msg_error:nnx { xtemplate } { bad-variable } @@ -574,6 +563,20 @@ { \tl_to_str:n { #1 global #2 } } } } +\cs_new_protected_nopar:Npn \xtemplate_create_variable:N #1 + { + \prg_case_str:onn \l_xtemplate_keytype_tl + { + { boolean } { \bool_new:N #1 } + { function } { \cs_new:Npn #1 { } } + { instance } { \cs_new_protected:Npn #1 { } } + { integer } { \int_new:N #1 } + { length } { \dim_new:N #1 } + { real } { \fp_new:N #1 } + { tokenlist } { \tl_new:N #1 } + } + { \use:c { \l_xtemplate_keytype_tl _ new:N } #1 } + } \cs_new_protected:Npn \xtemplate_implement_choices:n #1 { \clist_set_eq:NN \l_xtemplate_tmp_clist \l_xtemplate_keytype_arg_tl @@ -952,7 +955,6 @@ { \xtemplate_assign_tokenlist_aux:N \tl_gset:Nn } { \xtemplate_assign_tokenlist_aux:N \tl_set:Nn } } -\cs_new_eq:NN \xtemplate_assign_commalist: \xtemplate_assign_tokenlist: \cs_new_protected_nopar:Npn \xtemplate_assign_tokenlist_aux:N #1 { \xtemplate_if_key_value:oT \l_xtemplate_value_tl @@ -963,6 +965,12 @@ { \exp_not:o \l_xtemplate_value_tl } } } +\cs_new_protected_nopar:Npn \xtemplate_assign_commalist: + { + \bool_if:NTF \l_xtemplate_global_bool + { \xtemplate_assign_tokenlist_aux:N \clist_gset:Nn } + { \xtemplate_assign_tokenlist_aux:N \clist_set:Nn } + } \cs_new_protected_nopar:Npn \xtemplate_assign_variable:N #1 { \xtemplate_if_key_value:oT \l_xtemplate_value_tl @@ -1295,12 +1303,6 @@ No~interface~has~been~declared~for~a~template~ '#2'~of~object~type~'#1'. } -\msg_new:nnnn { xtemplate } { variable-not-declared } - { The~variable~'#1'~has~not~been~declared. } - { - Before~declaring~an~instance,~all~of~the~required~variables~ - used~in~template~keys~must~be~created. - } \msg_new:nnn { xtemplate } { declare-object-type } { Declaring~object~type~'#1'~taking~#2~argument(s)~\msg_line_context:. } \msg_new:nnn { xtemplate } { declare-template-code } |