diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-11 22:31:42 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-11 22:31:42 +0000 |
commit | c56f30c6154e55286a21f438d5ed545a5169f13b (patch) | |
tree | 78d305bd23e7a50cbbd320c30ffcff1e0fb193a5 /Master | |
parent | a57ec5a6dea711c791fc567803079341c6fbfae3 (diff) |
l3packages 3036 (11dec11)
git-svn-id: svn://tug.org/texlive/trunk@24821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/l3keys2e/l3keys2e.pdf | bin | 472081 -> 472145 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/xfrac/xfrac.pdf | bin | 624503 -> 624400 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/xparse/xparse.pdf | bin | 427962 -> 428611 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3packages/xtemplate/xtemplate.pdf | bin | 397217 -> 397274 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/l3keys2e/l3keys2e.dtx | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx | 104 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx | 90 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty | 63 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty | 78 |
10 files changed, 169 insertions, 174 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 b6c81a2a7d1..f7877a34779 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 74e4d607acc..c41d4a7a2f9 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 a907267c16d..1b2f858b34d 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 8b4b3ef954b..a5065ff45d8 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 41700387b5a..b5b5012d729 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 2966 2011-11-19 15:58:47Z joseph $ +\GetIdInfo$Id: l3keys2e.dtx 3036 2011-12-07 19:29:18Z 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/11/09 } +\@ifpackagelater { expl3 } { 2011/12/07 } { } { \PackageError { l3keys2e } { Support~package~l3kernel~too~old. } diff --git a/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx b/Master/texmf-dist/source/latex/l3packages/xparse/xparse.dtx index d6dcd508254..efdbf34ad8c 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 2966 2011-11-19 15:58:47Z joseph $ +\GetIdInfo$Id: xparse.dtx 3036 2011-12-07 19:29:18Z joseph $ {L3 Experimental document command parser} %</driver|package> %<*driver> @@ -236,20 +236,20 @@ % |\foo{arg1}[arg2]| will find an optional argument but % \verb*|\foo{arg1} [arg2]| will not. This is so that trailing optional % arguments are not picked up \enquote{by accident} in input. -% +% % \subsection{Verbatim arguments} % % Arguments of type \enquote{\texttt{v}} are read in verbatim mode, which will % result in the grabbed argument consisting of tokens of category code % $12$~(\enquote{other}), except spaces, which are given category code % $10$~(\enquote{space}). The argument will be -% delimited in a similar manner to the \LaTeXe{} \cs{verb} function. -% +% delimited in a similar manner to the \LaTeXe{} \cs{verb} function. +% % Functions containing verbatim arguments cannot appear in the arguments % of other functions. The \texttt{v}~argument specifier includes code to check % this, and will raise an error if the grabbed argument has already been % tokenized by \TeX{}. -% +% % Users should note that support for verbatim arguments is somewhat % experimental. Feedback is therefore very welcome on the \texttt{LaTeX-L} % mailing list. @@ -456,9 +456,9 @@ % \meta{token} up to a maximum of \meta{number} tokens (thus % dividing the input into $\text{\meta{number}} + 1$ parts). % An error is given if too many \meta{tokens} are present in the -% input. The processed input is places inside +% input. The processed input is placed inside % $\text{\meta{number}} + 1$ sets of braces for further use. -% If there are less than \Arg{number} of \Arg{tokens} in the argument +% If there are fewer than \Arg{number} of \Arg{tokens} in the argument % then empty brace groups are added at the end of the processed % argument. % \begin{verbatim} @@ -472,10 +472,10 @@ % % \begin{function}{\SplitList} % \begin{syntax} -% \cs{SplitList} \Arg{token} +% \cs{SplitList} \Arg{token(s)} % \end{syntax} % This processor splits the argument given at each occurrence of the -% \meta{token} where the number of items is not fixed. Each item is +% \meta{token(s)} where the number of items is not fixed. Each item is % then wrapped in braces within |#1|. The result is that the % processed argument can be further processed using a mapping function. % \begin{verbatim} @@ -483,10 +483,11 @@ % { > { \SplitList { ; } } m } % { \MappingFunction #1 } % \end{verbatim} -% Any category code $13$ (active) \meta{tokens} will be replaced +% If only a single \meta{token} is used for the split, any +% category code $13$ (active) \meta{token} will be replaced % before the split takes place. % \end{function} -% +% % \begin{function}{\TrimSpaces} % \begin{syntax} % \cs{TrimSpaces} @@ -507,7 +508,7 @@ % end removed. \cs{TrimSpaces} will remove multiple spaces from the ends of % the input in cases where these have been included such that the standard % \TeX{} conversion of multiple spaces to a single space does not apply. -% +% % \textbf{This function is experimental.} % \end{function} % @@ -626,7 +627,7 @@ % that each command or environment declared is logged. By loading % \pkg{xparse} using % \begin{verbatim} -% \usepackage[load-declarations=false]{xparse} +% \usepackage[log-declarations=false]{xparse} % \end{verbatim} % this may be suppressed and no information messages are produced. % @@ -648,7 +649,7 @@ % % A check to make sure that \pkg{expl3} is not too old % \begin{macrocode} -\@ifpackagelater { expl3 } { 2011/11/19 } +\@ifpackagelater { expl3 } { 2011/12/07 } { } { \PackageError { xparse } { Support~package~l3kernel~too~old. } @@ -2195,48 +2196,55 @@ % \end{macro} % \end{macro} % -%\begin{macro}{\l_xparse_split_list_tl} -%\begin{macro}{\xparse_split_list:nn} -%\begin{macro}{\xparse_split_list_aux:w} -% Splitting a list is done again by first dealing with active -% characters, then looping over the list using the same method as the -% \cs{clist_map_\ldots} functions. +% \begin{variable}{\l_xparse_split_list_seq, \l_xparse_split_list_tl} +% \begin{macro}{\xparse_split_list:nn} +% \begin{macro}[aux]{\xparse_split_list_multi:nn, xparse_split_list_multi:nV} +% \begin{macro}[aux]{xparse_split_list_single:Nn} +% Splitting can take place either at a single token or at a longer +% identifier. To deal with single active tokens, a two-part procedur is +% needed. % \begin{macrocode} +\seq_new:N \l_xparse_split_list_seq \tl_new:N \l_xparse_split_list_tl -\group_begin: - \char_set_catcode_active:N \@ - \cs_new_protected:Npn \xparse_split_list:nn #1#2 - { - \tl_set:Nn \l_xparse_split_list_tl {#2} - \group_begin: - \char_set_lccode:nn { `\@ } { `#1 } - \tl_to_lowercase:n - { - \group_end: - \tl_replace_all:Nnn \l_xparse_split_list_tl { @ } {#1} - } - \cs_set:Npn \xparse_split_list_aux:w ##1 #1 - { - \quark_if_recursion_tail_stop:n {##1} - \tl_put_right:Nn \ProcessedArgument { {##1} } - \xparse_split_list_aux:w - } - \tl_if_empty:NTF \l_xparse_split_list_tl - { \tl_set:Nn \ProcessedArgument { { } } } - { - \tl_clear:N \ProcessedArgument - \exp_after:wN \xparse_split_list_aux:w - \l_xparse_split_list_tl #1 - \q_recursion_tail #1 \q_recursion_stop - } +\cs_new_protected:Npn \xparse_split_list:nn #1#2 + { + \bool_if:nTF + { + \tl_if_single_p:n {#1} && + ! (\token_if_cs_p:N #1 ) + } + { \xparse_split_list_single:Nn #1 {#2} } + { \xparse_split_list_multi:nn {#1} {#2} } } +\cs_set_protected:Npn \xparse_split_list_multi:nn #1#2 + { + \seq_set_split:Nnn \l_xparse_split_list_seq {#1} {#2} + \tl_clear:N \ProcessedArgument + \seq_map_inline:Nn \l_xparse_split_list_seq + { \tl_put_right:Nn \ProcessedArgument { {##1} } } + } +\cs_generate_variant:Nn \xparse_split_list_multi:nn { nV } +\group_begin: +\char_set_catcode_active:N \@ +\cs_new_protected:Npn \xparse_split_list_single:Nn #1#2 + { + \tl_set:Nn \l_xparse_split_list_tl {#2} + \group_begin: + \char_set_lccode:nn { `\@ } { `#1 } + \tl_to_lowercase:n + { + \group_end: + \tl_replace_all:Nnn \l_xparse_split_list_tl { @ } {#1} + } + \xparse_split_list_multi:nV {#1} \l_xparse_split_list_tl + } \group_end: -\cs_new_protected:Npn \xparse_split_list_aux:w { } % \end{macrocode} % \end{macro} % \end{macro} % \end{macro} -% +% \end{variable} +% % \begin{macro}{\xparse_trim_spaces:n} % This one is almost trivial. % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx b/Master/texmf-dist/source/latex/l3packages/xtemplate/xtemplate.dtx index 656cb20727a..afa30c7500b 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 2966 2011-11-19 15:58:47Z joseph $ +\GetIdInfo$Id: xtemplate.dtx 3036 2011-12-07 19:29:18Z joseph $ {L3 Experimental prototype document functions} %</driver|package> %<*driver> @@ -661,7 +661,7 @@ % % A check to make sure that \pkg{expl3} is not too old % \begin{macrocode} -\@ifpackagelater { expl3 } { 2011/11/19 } +\@ifpackagelater { expl3 } { 2011/12/07 } { } { \PackageError { xtemplate } { Support~package~l3kernel~too~old. } @@ -2424,7 +2424,6 @@ % \xtemplate_show_vars:nn % } % \begin{macro}[int]{\xtemplate_show:Nnnn} -% \begin{macro}[aux]{\xtemplate_show_aux:nn} % A modified version of the property-list printing code, such that % the output refers to templates and instances rather than to the % underlying structures. @@ -2448,7 +2447,7 @@ } } \cs_new_protected_nopar:Npn \xtemplate_show_vars:nn #1#2 - { + { \xtemplate_execute_if_code_exist:nnT {#1} {#2} { \xtemplate_recover_vars:n { #1 / #2 } @@ -2458,31 +2457,16 @@ } \cs_new_protected_nopar:Npn \xtemplate_show:Nnnn #1#2#3#4 { - \prop_if_empty:NTF #1 - { - \iow_term:x { Template~'#3'~of~object~type~'#2'~has~no~#4 . } - \tl_show:n { } - } - { - \iow_term:x { Template~'#3'~of~object~type~'#2'~has~ #4 : } - \tl_set:Nx \l_prop_show_tl - { \prop_map_function:NN #1 \xtemplate_show_aux:nn } - \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN - { \exp_after:wN \prop_show_aux:w \l_prop_show_tl } - } -} -\cs_new:Npn \xtemplate_show_aux:nn #1#2 - { - \iow_newline: > \c_space_tl \c_space_tl - #1 - \c_space_tl \c_space_tl => \c_space_tl \c_space_tl - \exp_not:n {#2} + \msg_aux_use:nnxxxx { xtemplate } + { \prop_if_empty:NTF #1 { show-no-attribute } { show-attribute } } + {#2} {#3} {#4} { } + \msg_aux_show:x + { \prop_map_function:NN #1 \msg_aux_show_unbraced:nn } } % \end{macrocode} % \end{macro} % \end{macro} -% \end{macro} -% +% % \begin{macro}{\template_show_values:nnn} % Instance values are a little more complex, as there are the collection % and template to consider. @@ -2494,35 +2478,20 @@ \xtemplate_recover_values:n { #1 / #2 / #3 } \prop_if_empty:NTF \l_xtemplate_values_prop { - \iow_term:x - { - \tl_if_empty:nTF {#2} - { Instance~'#3'~ } - { Collection instance~'#3'~(from~collection~'#2')~ } - of~object~type~'#1'~has~no~values. - } - \tl_show:n { } + \msg_aux_use:nnxxxx { xtemplate } { show-no-values } + {#1} {#2} {#3} { } + \msg_aux_show:x { } } { \prop_pop:NnN \l_xtemplate_values_prop { from~template } \l_xtemplate_tmp_tl - \iow_term:x - { - \tl_if_empty:nTF {#2} - { Instance~'#3'~ } - { Collection instance~'#3'~(from~collection~'#2')~ } - of~object~type~'#1' - \quark_if_no_value:NF \l_xtemplate_tmp_tl - { ~(from~template~' \l_xtemplate_tmp_tl ')~ } - has~values: - } - \tl_set:Nx \l_prop_show_tl + \msg_aux_use:nnxxxx { xtemplate } { show-values } + {#1} {#2} {#3} { \l_xtemplate_tmp_tl } + \msg_aux_show:x { \prop_map_function:NN \l_xtemplate_values_prop - \xtemplate_show_aux:nn + \msg_aux_show_unbraced:nn } - \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN - { \exp_after:wN \prop_show_aux:w \l_prop_show_tl } } } } @@ -2707,7 +2676,7 @@ '#2'~of~object~type~'#1'. } % \end{macrocode} -% +% % Information messages only have text: more text should not be needed. % \begin{macrocode} \msg_new:nnn { xtemplate } { declare-object-type } @@ -2719,14 +2688,35 @@ Declaring~interface~for~template~'#2'~of~object~type~'#1'~ \msg_line_context:. } +\msg_new:nnn { xtemplate } { show-no-attribute } + { Template~'#2'~of~object~type~'#1'~has~no~#3 . } +\msg_new:nnn { xtemplate } { show-attribute } + { Template~'#2'~of~object~type~'#1'~has~#3 : } +\msg_new:nnn { xtemplate } { show-no-values } + { + \tl_if_empty:nTF {#2} + { Instance~'#3'~ } + { Collection instance~'#3'~(from~collection~'#2')~ } + of~object~type~'#1'~has~no~values. + } +\msg_new:nnn { xtemplate } { show-values } + { + \tl_if_empty:nTF {#2} + { Instance~'#3'~ } + { Collection instance~'#3'~(from~collection~'#2')~ } + of~object~type~'#1' + \quark_if_no_value:NF #4 + { ~(from~template~'#4')~ } + has~values: + } % \end{macrocode} -% +% % \subsection{User functions} % % The user functions provided by \pkg{xtemplate} are pretty much direct % copies of internal ones. However, by sticking to the \pkg{xparse} % approach only the appropriate arguments are long. -% +% % \begin{macro}{\DeclareObjectType} % \begin{macro}{\DeclareTemplateInterface} % \begin{macro}{\DeclareTemplateCode} diff --git a/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty b/Master/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty index ec331202c34..64c7c7e3229 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 2966 2011-11-19 15:58:47Z joseph $ +\GetIdInfo$Id: l3keys2e.dtx 3036 2011-12-07 19:29:18Z joseph $ {LaTeX2e option processing using LaTeX3 keys} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\@ifpackagelater { expl3 } { 2011/11/09 } +\@ifpackagelater { expl3 } { 2011/12/07 } { } { \PackageError { l3keys2e } { Support~package~l3kernel~too~old. } diff --git a/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty b/Master/texmf-dist/tex/latex/l3packages/xparse/xparse.sty index 8e0d8a77b4d..ceb28c984f4 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 2966 2011-11-19 15:58:47Z joseph $ +\GetIdInfo$Id: xparse.dtx 3036 2011-12-07 19:29:18Z joseph $ {L3 Experimental document command parser} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} \RequirePackage{expl3} -\@ifpackagelater { expl3 } { 2011/11/19 } +\@ifpackagelater { expl3 } { 2011/12/07 } { } { \PackageError { xparse } { Support~package~l3kernel~too~old. } @@ -910,36 +910,41 @@ { \xparse_split_argument_aux_iii:w #2 \q_stop } } \cs_new_protected:Npn \xparse_split_argument_aux_iii:w { } +\seq_new:N \l_xparse_split_list_seq \tl_new:N \l_xparse_split_list_tl -\group_begin: - \char_set_catcode_active:N \@ - \cs_new_protected:Npn \xparse_split_list:nn #1#2 - { - \tl_set:Nn \l_xparse_split_list_tl {#2} - \group_begin: - \char_set_lccode:nn { `\@ } { `#1 } - \tl_to_lowercase:n - { - \group_end: - \tl_replace_all:Nnn \l_xparse_split_list_tl { @ } {#1} - } - \cs_set:Npn \xparse_split_list_aux:w ##1 #1 - { - \quark_if_recursion_tail_stop:n {##1} - \tl_put_right:Nn \ProcessedArgument { {##1} } - \xparse_split_list_aux:w - } - \tl_if_empty:NTF \l_xparse_split_list_tl - { \tl_set:Nn \ProcessedArgument { { } } } - { - \tl_clear:N \ProcessedArgument - \exp_after:wN \xparse_split_list_aux:w - \l_xparse_split_list_tl #1 - \q_recursion_tail #1 \q_recursion_stop - } +\cs_new_protected:Npn \xparse_split_list:nn #1#2 + { + \bool_if:nTF + { + \tl_if_single_p:n {#1} && + ! (\token_if_cs_p:N #1 ) + } + { \xparse_split_list_single:Nn #1 {#2} } + { \xparse_split_list_multi:nn {#1} {#2} } } +\cs_set_protected:Npn \xparse_split_list_multi:nn #1#2 + { + \seq_set_split:Nnn \l_xparse_split_list_seq {#1} {#2} + \tl_clear:N \ProcessedArgument + \seq_map_inline:Nn \l_xparse_split_list_seq + { \tl_put_right:Nn \ProcessedArgument { {##1} } } + } +\cs_generate_variant:Nn \xparse_split_list_multi:nn { nV } +\group_begin: +\char_set_catcode_active:N \@ +\cs_new_protected:Npn \xparse_split_list_single:Nn #1#2 + { + \tl_set:Nn \l_xparse_split_list_tl {#2} + \group_begin: + \char_set_lccode:nn { `\@ } { `#1 } + \tl_to_lowercase:n + { + \group_end: + \tl_replace_all:Nnn \l_xparse_split_list_tl { @ } {#1} + } + \xparse_split_list_multi:nV {#1} \l_xparse_split_list_tl + } \group_end: -\cs_new_protected:Npn \xparse_split_list_aux:w { } \cs_new_protected:Npn \xparse_trim_spaces:n #1 { \tl_set:Nx \ProcessedArgument { \tl_trim_spaces:n {#1} } } \cs_new_protected:Npn \xparse_exp_add_type_d:w #1#2 diff --git a/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty b/Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty index 590c9e2f461..42525d2e497 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 2966 2011-11-19 15:58:47Z joseph $ +\GetIdInfo$Id: xtemplate.dtx 3036 2011-12-07 19:29:18Z joseph $ {L3 Experimental prototype document functions} \ProvidesExplPackage {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} -\@ifpackagelater { expl3 } { 2011/11/19 } +\@ifpackagelater { expl3 } { 2011/12/07 } { } { \PackageError { xtemplate } { Support~package~l3kernel~too~old. } @@ -1071,25 +1071,11 @@ } \cs_new_protected_nopar:Npn \xtemplate_show:Nnnn #1#2#3#4 { - \prop_if_empty:NTF #1 - { - \iow_term:x { Template~'#3'~of~object~type~'#2'~has~no~#4 . } - \tl_show:n { } - } - { - \iow_term:x { Template~'#3'~of~object~type~'#2'~has~ #4 : } - \tl_set:Nx \l_prop_show_tl - { \prop_map_function:NN #1 \xtemplate_show_aux:nn } - \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN - { \exp_after:wN \prop_show_aux:w \l_prop_show_tl } - } -} -\cs_new:Npn \xtemplate_show_aux:nn #1#2 - { - \iow_newline: > \c_space_tl \c_space_tl - #1 - \c_space_tl \c_space_tl => \c_space_tl \c_space_tl - \exp_not:n {#2} + \msg_aux_use:nnxxxx { xtemplate } + { \prop_if_empty:NTF #1 { show-no-attribute } { show-attribute } } + {#2} {#3} {#4} { } + \msg_aux_show:x + { \prop_map_function:NN #1 \msg_aux_show_unbraced:nn } } \cs_new_protected_nopar:Npn \xtemplate_show_values:nnn #1#2#3 { @@ -1098,35 +1084,20 @@ \xtemplate_recover_values:n { #1 / #2 / #3 } \prop_if_empty:NTF \l_xtemplate_values_prop { - \iow_term:x - { - \tl_if_empty:nTF {#2} - { Instance~'#3'~ } - { Collection instance~'#3'~(from~collection~'#2')~ } - of~object~type~'#1'~has~no~values. - } - \tl_show:n { } + \msg_aux_use:nnxxxx { xtemplate } { show-no-values } + {#1} {#2} {#3} { } + \msg_aux_show:x { } } { \prop_pop:NnN \l_xtemplate_values_prop { from~template } \l_xtemplate_tmp_tl - \iow_term:x - { - \tl_if_empty:nTF {#2} - { Instance~'#3'~ } - { Collection instance~'#3'~(from~collection~'#2')~ } - of~object~type~'#1' - \quark_if_no_value:NF \l_xtemplate_tmp_tl - { ~(from~template~' \l_xtemplate_tmp_tl ')~ } - has~values: - } - \tl_set:Nx \l_prop_show_tl + \msg_aux_use:nnxxxx { xtemplate } { show-values } + {#1} {#2} {#3} { \l_xtemplate_tmp_tl } + \msg_aux_show:x { \prop_map_function:NN \l_xtemplate_values_prop - \xtemplate_show_aux:nn + \msg_aux_show_unbraced:nn } - \etex_showtokens:D \exp_after:wN \exp_after:wN \exp_after:wN - { \exp_after:wN \prop_show_aux:w \l_prop_show_tl } } } } @@ -1312,6 +1283,27 @@ Declaring~interface~for~template~'#2'~of~object~type~'#1'~ \msg_line_context:. } +\msg_new:nnn { xtemplate } { show-no-attribute } + { Template~'#2'~of~object~type~'#1'~has~no~#3 . } +\msg_new:nnn { xtemplate } { show-attribute } + { Template~'#2'~of~object~type~'#1'~has~#3 : } +\msg_new:nnn { xtemplate } { show-no-values } + { + \tl_if_empty:nTF {#2} + { Instance~'#3'~ } + { Collection instance~'#3'~(from~collection~'#2')~ } + of~object~type~'#1'~has~no~values. + } +\msg_new:nnn { xtemplate } { show-values } + { + \tl_if_empty:nTF {#2} + { Instance~'#3'~ } + { Collection instance~'#3'~(from~collection~'#2')~ } + of~object~type~'#1' + \quark_if_no_value:NF #4 + { ~(from~template~'#4')~ } + has~values: + } \cs_new_protected_nopar:Npn \DeclareObjectType #1#2 { \xtemplate_declare_object_type:nn {#1} {#2} } \cs_new_protected:Npn \DeclareTemplateInterface #1#2#3#4 |