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/texmf-dist/tex/latex/l3packages/xtemplate | |
parent | a57ec5a6dea711c791fc567803079341c6fbfae3 (diff) |
l3packages 3036 (11dec11)
git-svn-id: svn://tug.org/texlive/trunk@24821 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3packages/xtemplate')
-rw-r--r-- | Master/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty | 78 |
1 files changed, 35 insertions, 43 deletions
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 |