diff options
author | Karl Berry <karl@freefriends.org> | 2010-05-19 23:24:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-05-19 23:24:35 +0000 |
commit | fb8881a67bb8f860de4fed71bbdb2b2b7c39ac89 (patch) | |
tree | f59784032722714800a2d0f2d2a519e8a40c4a3b /Master/texmf-dist/tex/latex/xpackages | |
parent | 97a0746aa6e947818c4d32c3b70e899907124c22 (diff) |
xpackages 1902 (18may10)
git-svn-id: svn://tug.org/texlive/trunk@18358 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/xpackages')
3 files changed, 43 insertions, 380 deletions
diff --git a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty index 18e704e88cd..d3a64fcc10f 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xbase/xparse.sty @@ -57,7 +57,7 @@ %% ----------------------------------------------------------------------- %% \RequirePackage{l3names} -\GetIdInfo$Id: xparse.dtx 1897 2010-04-26 05:56:56Z joseph $ +\GetIdInfo$Id: xparse.dtx 1905 2010-05-19 07:45:31Z joseph $ {Generic document command parser} \ProvidesExplPackage {\filename}{\filedate}{\fileversion}{\filedescription} @@ -687,7 +687,7 @@ { \exp_not:n {#2} } {#1} { \exp_not:n {#3} } } } - \tl_set:Nx \_l_xparse_tmp_tl + \tl_set:Nx \l_xparse_tmp_tl { \prg_replicate:nn { #1 + 1 } { \_xparse_split_argument_aux_i:w } @@ -697,7 +697,7 @@ \prg_replicate:nn {#1} { \exp_not:n {#2} \NoValue } \exp_not:n { #2 \q_stop } } - \_l_xparse_tmp_tl + \l_xparse_tmp_tl } \group_end: \cs_set_protected:Npn \_xparse_split_argument_aux_i:w { } @@ -708,6 +708,36 @@ { \_xparse_split_argument_aux_iii:w #2 \q_stop } } \cs_set_protected:Npn \_xparse_split_argument_aux_iii:w { } +\tl_new:N \_l_xparse_split_list_tl +\group_begin: + \char_make_active:N \@ + \cs_gset_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_in: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_last_unbraced:NV \_xparse_split_list_aux:w + \_l_xparse_split_list_tl #1 + \q_recursion_tail #1 \q_recursion_stop + } + } +\group_end: +\cs_set:Npn \_xparse_split_list_aux:w { } \cs_new:Npn \xparse_exp_add_type_d:w #1#2 { \xparse_exp_add_type_D:w #1 #2 { \NoValue } } @@ -1089,6 +1119,7 @@ \cs_new:Npn \ProcessedArgument { } \cs_new_eq:NN \ReverseBoolean \_xparse_bool_reverse:N \cs_new_eq:NN \SplitArgument \_xparse_split_argument:nnn +\cs_new_eq:NN \SplitList \_xparse_split_list:nn \endinput %% %% End of file `xparse.sty'. diff --git a/Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty b/Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty deleted file mode 100644 index 1e80bf977d2..00000000000 --- a/Master/texmf-dist/tex/latex/xpackages/xhead/xhead.sty +++ /dev/null @@ -1,376 +0,0 @@ -%% -%% This is file `xhead.sty', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% xhead.dtx (with options: `package,trace') -%% -%% (C) Copyright The LaTeX3 Project and any individual authors -%% listed elsewhere in this file. -%% -%% This is a generated file. -%% -%% This file was generated from file(s) of the xhead bundle. -%% ----------------------------------------------------------- -%% -%% This file may only be distributed together with a copy of this bundle. -%% You may however distribute the bundle without such generated files. -%% -%% ====================================================================== -%% -%% File xhead.dtx (C) Copyright 2010 Frank Mittelbach, LaTeX3 Project -%% -%% It may be distributed and/or modified under the conditions of the -%% LaTeX Project Public License (LPPL), either version 1.3c of this -%% license or (at your option) any later version. The latest version -%% of this license is in the file -%% -%% http://www.latex-project.org/lppl.txt -%% -%% This file is part of the ``xhead bundle'' (The Work in LPPL) -%% and all files in that bundle must be distributed together. -%% -%% The released version of this bundle is available from CTAN. -%% -%% ----------------------------------------------------------------------- -%% -%% The development version of the bundle can be found at -%% -%% http://www.latex-project.org/svnroot/experimental/trunk/ -%% -%% for those people who are interested. -%% -%%%%%%%%%%% -%% NOTE: %% -%%%%%%%%%%% -%% -%% Snapshots taken from the repository represent work in progress and may -%% not work or may contain conflicting material! We therefore ask -%% people _not_ to put them into distributions, archives, etc. without -%% prior consultation with the LaTeX Project Team. -%% -%% ----------------------------------------------------------------------- -%% -\RequirePackage{expl3} -\GetIdInfo$Id: xhead.dtx 1686 2009-11-03 08:19:19Z joseph $ - {Templates heading commands} -\RequirePackage{expl3,xtemplate} -\GetIdInfo$Id: xhead.dtx 1771 2010-02-05 20:51:22Z frank $ - {heading module} -\ProvidesExplPackage - {\filename}{\filedate}{\fileversion}{\filedescription} -\DeclareObjectType {heading} {7} -\cs_new:Npn \xhead_generate_toc:NNNNN #1#2#3#4#5 { - \typeout{xhead_generate_toc:NNNNN=#1:#2:#3:#4:#5} - \bool_if:nT - { #2 || ! #1 } - { - \group_begin: - \cs_set_eq:NN \@mkboth \use_none:nn - \cs_set_eq:NN \markboth \use_none:nn - \cs_set_eq:NN \markright \use_none:n - \addcontentsline{toc}{#3} - { - \tl_if_empty:NF #4 - { \protect\numberline{ #4 } } - #5 - } - \group_end: - } -} -\cs_generate_variant:Nn \xhead_generate_toc:NNNNN {NNNNo} -\cs_new:Npn \xhead_generate_mark:NNNNN #1#2#3#4#5 { - \typeout{xhead_generate_mark:NNNNN=#1:#2:#3:#4:#5} - \bool_if:nT - { #2 || ! #1 } - { - \group_begin: - \cs_set_eq:NN \@mkboth \use_none:nn - \use:c {#3 mark} {#5} - \group_end: - } -} -\cs_generate_variant:Nn \xhead_generate_mark:NNNNN {NNNNo} -\cs_new:Npn \xhead_generate_toc_and_mark:NNNNNNN #1#2#3#4#5#6#7 { - \xhead_generate_toc:NNNNo - #1 #2 #4 #5 #6 - \xhead_generate_mark:NNNNo - #1 #3 #4 #5 #7 -} - -\cs_new:Npn \xhead_update_prepare_number:N #1 { - \bool_if:nTF - { #1 || \intexpr_compare_p:n { \l_xhead_level_int > \c@secnumdepth } } - { \tl_clear:N \l_xhead_number_tl } - { - \refstepcounter \l_xhead_name_tl - \tl_set:Nx \l_xhead_number_tl { \use:c {the \l_xhead_name_tl} } - } -} -\cs_new:Npn \xhead_set_after_indention:N #1 { - \bool_if:NTF #1 \@afterindenttrue \@afterindentfalse -} -\cs_new:Npn \xhead_set_titles:nnn #1#2#3 { - \IfNoValueTF{#1} - { \tl_set:Nn \l_xhead_toc_title_tl {#3} } - { \tl_if_empty:nTF {#1} - { \tl_set:Nn \l_xhead_toc_title_tl {#3} } - { \tl_set:Nn \l_xhead_toc_title_tl {#1} } - } - \IfNoValueTF{#2} - { \tl_set_eq:NN \l_xhead_mark_title_tl \l_xhead_toc_title_tl } - { \tl_if_empty:nTF {#2} - { \tl_set:Nn \l_xhead_mark_title_tl {#3} } - { \tl_set:Nn \l_xhead_mark_title_tl {#2} } - } -} -\dim_new:N \l_xhead_indent_dim -\skip_new:N \l_xhead_above_skip -\skip_new:N \l_xhead_below_skip -\int_new:N \l_xhead_level_int -\int_new:N \l_xhead_break_penalty_int -\tl_new:N \l_xhead_name_tl -\tl_new:N \l_xhead_number_tl -\tl_new:N \l_xhead_toc_title_tl -\tl_new:N \l_xhead_mark_title_tl -\bool_new:N \l_xhead_indent_after_bool - -\cs_new:Npn \xhead_title_decl: {} - -\cs_new:Npn \xhead_number_format:n #1 {} - -\cs_new:Npn \xhead_default_number_format:n #1 { #1 \quad} -\DeclareTemplateInterface {heading} {2e-vertical} {7} - { - name : tokenlist = ??? , - level : integer = 0 , - break-penalty: integer = -300 , - indent : length = 0pt , - above-skip : skip = 0pt , - below-skip : skip = 0pt , - title-decl : function {0} = , - number-format: function {1} = \xhead_default_number_format:n {#1} , - indent-after : boolean = false , - } -\DeclareTemplateCode {heading} {2e-vertical} {7} - { - name = \l_xhead_name_tl , - level = \l_xhead_level_int , - break-penalty = \l_xhead_break_penalty_int , - indent = \l_xhead_indent_dim , - above-skip = \l_xhead_above_skip , - below-skip = \l_xhead_below_skip , - title-decl = \xhead_title_decl: , - number-format = \xhead_number_format:n , - indent-after = \l_xhead_indent_after_bool , - } - { - \AssignTemplateKeys - \bool_if:NF #1 - { - \IfNoValueTF{#2} - { \tl_set:Nn \l_xhead_toc_title_tl {#6} } - { \tl_set:Nn \l_xhead_toc_title_tl {#2} } - \tl_set_eq:NN \l_xhead_mark_title_tl \l_xhead_toc_title_tl - } - \xhead_update_prepare_number:N #1 - \xhead_set_after_indention:N \l_xhead_indent_after_bool - \if@noskipsec \leavevmode \fi - \par - \if@nobreak - \everypar{} - \else: - \addpenalty \l_xhead_break_penalty_int - \addvspace \l_xhead_above_skip - \fi: - \group_begin: - \xhead_title_decl: - { - \@hangfrom{\hskip \l_xhead_indent_dim \scan_stop: - \tl_if_empty:NF \l_xhead_number_tl - { \xhead_number_format:n \l_xhead_number_tl } - } - \interlinepenalty \@M #6\@@par - } - \group_end: - \xhead_generate_toc_and_mark:NNNNNNN - #1 \BooleanFalse \BooleanFalse % no forcing in 2e - \l_xhead_name_tl - \l_xhead_number_tl - \l_xhead_toc_title_tl - \l_xhead_mark_title_tl - \par \nobreak - \vspace \l_xhead_below_skip - \@afterheading - \ignorespaces - } -\DeclareTemplateInterface {heading} {3a-vertical} {7} - { - name : tokenlist = ??? , - level : integer = 0 , - break-penalty : integer = -300 , - indent : length = 0pt , - above-skip : skip = 0pt , - below-skip : skip = 0pt , - format : tokenlist = indent-by-number , - parshape : instance {parshape} = plain , - justification : instance {justification} = flush-left , - font : tokenlist = , - number-format : function {1} = \xhead_default_number_format:n {#1} , - indent-after : boolean = false , - } - -\tl_new:N \l_xhead_title_format_tl -\tl_new:N \l_xhead_title_font_tl - -\cs_new:Npn \xhead_title_parshape: {} -\cs_new:Npn \xhead_title_justification: {} - -\DeclareTemplateCode {heading} {3a-vertical} {7} - { - name = \l_xhead_name_tl , - level = \l_xhead_level_int , - break-penalty = \l_xhead_break_penalty_int , - indent = \l_xhead_indent_dim , - above-skip = \l_xhead_above_skip , - below-skip = \l_xhead_below_skip , - format = \l_xhead_title_format_tl , - parshape = \xhead_title_parshape: , - justification = \xhead_title_justification: , - font = \l_xhead_title_font_tl , - number-format = \xhead_number_format:n , - indent-after = \l_xhead_indent_after_bool , - } - { - \AssignTemplateKeys - \xhead_set_titles:nnn {#2} {#4} {#6} - \xhead_update_prepare_number:N #1 - \xhead_set_after_indention:N \l_xhead_indent_after_bool - \if@noskipsec \leavevmode \fi - \par - \if@nobreak - \everypar{} - \else: - \addpenalty \l_xhead_break_penalty_int - \addvspace \l_xhead_above_skip - \fi: - \xhead_use_title_format:nn \l_xhead_title_format_tl {#6} - - \xhead_generate_toc_and_mark:NNNNNNN - #1 #3 #5 - \l_xhead_name_tl - \l_xhead_number_tl - \l_xhead_toc_title_tl - \l_xhead_mark_title_tl - \par \nobreak - \vspace \l_xhead_below_skip - \@afterheading - \ignorespaces - } -\cs_new:Npn \xhead_use_title_format:nn #1 { - \cs_if_exist:cTF {xhead_format_ #1:n} - { \use:c{xhead_format_ #1:n} } - { \ERROR xhead format not defined } -} -\cs_new:cpn {xhead_format_indent-by-number:n} #1 { - \group_begin: - \l_xhead_title_font_tl - \hbox_set:Nn \l_tmpa_box - { - \tl_if_empty:NF \l_xhead_number_tl - { \xhead_number_format:n \l_xhead_number_tl } - } - - \UseInstance{measure}{fullwidth} - {\l_xhead_indent_dim + \box_wd:N \l_tmpa_box } - - \xhead_title_parshape: - \xhead_title_justification: - \interlinepenalty \@M - - \noindent \hbox_overlap_left:n { \box_use:N \l_tmpa_box } - #1\@@par - \group_end: -} -\cs_new:cpn {xhead_format_number-above-text:n} #1 { - \group_begin: - \l_xhead_title_font_tl - \xhead_title_parshape: - \xhead_title_justification: - \interlinepenalty \@M - - \tl_if_empty:NF \l_xhead_number_tl - { - \xhead_number_format:n \l_xhead_number_tl - } - - #1\@@par - \group_end: -} - -\input{xtextblock.sty} - -\DeclareTemplateInterface {heading} {3b-vertical} {7} - { - name : tokenlist = ??? , - level : integer = 0 , - break-penalty : integer = -300 , - indent : length = 0pt , - above-skip : skip = 0pt , - below-skip : skip = 0pt , - title-format : instance {textblock-2} = heading , - number-format : function {1} = \xhead_default_number_format:n {#1} , - indent-after : boolean = false , - } - -\cs_new:Npn \xhead_title_format:nn #1#2 {} - -\DeclareTemplateCode {heading} {3b-vertical} {7} - { - name = \l_xhead_name_tl , - level = \l_xhead_level_int , - break-penalty = \l_xhead_break_penalty_int , - indent = \l_xhead_indent_dim , - above-skip = \l_xhead_above_skip , - below-skip = \l_xhead_below_skip , - title-format = \xhead_title_format:nn , - number-format = \xhead_number_format:n , - indent-after = \l_xhead_indent_after_bool , - } - { - \AssignTemplateKeys - - \xhead_set_titles:nnn {#2} {#4} {#6} - - \xhead_update_prepare_number:N #1 - - \xhead_set_after_indention:N \l_xhead_indent_after_bool - - \if@noskipsec \leavevmode \fi - \par - \if@nobreak - \everypar{} - \else: - \addpenalty \l_xhead_break_penalty_int - \addvspace \l_xhead_above_skip - \fi: - - \xhead_title_format:nn \l_xhead_number_tl {#6} - - \xhead_generate_toc_and_mark:NNNNNNN - #1 #3 #5 - \l_xhead_name_tl - \l_xhead_number_tl - \l_xhead_toc_title_tl - \l_xhead_mark_title_tl - - \par \nobreak - \vspace \l_xhead_below_skip - \@afterheading - \ignorespaces - } - -\endinput -%% -%% End of file `xhead.sty'. diff --git a/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty b/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty index e108b0aff35..6c18e8ba3f0 100644 --- a/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty +++ b/Master/texmf-dist/tex/latex/xpackages/xtras/l3keys2e.sty @@ -51,6 +51,7 @@ {\filename}{\filedate}{\fileversion}{\filedescription} \RequirePackage{xparse} \clist_new:N \keys_latexe_options_clist +\bool_new:N \_l_keys_process_class_bool \cs_new:Npn \keys_latexe_options:n #1 { \clist_clear:N \keys_latexe_options_clist \keys_latexe_options_global:n {#1} @@ -75,7 +76,8 @@ \cs_if_eq:NNTF \@currext \@clsextension { \keys_latexe_options_class:n {#1} }{ - \keys_latexe_options_package:n {#1} + \bool_if:NT \_l_keys_process_class_bool + { \keys_latexe_options_package:n {#1} } } } } @@ -109,9 +111,15 @@ } \cs_new:Npn \keys_latexe_remove_equals:w #1 = #2 \q_stop {#1} \NewDocumentCommand \ProcessKeysOptions { m } { + \bool_set_true:N \_l_keys_process_class_bool + \keys_latexe_options:n {#1} +} +\NewDocumentCommand \ProcessKeysPackageOptions { m } { + \bool_set_false:N \_l_keys_process_class_bool \keys_latexe_options:n {#1} } \@onlypreamble \ProcessKeysOptions +\@onlypreamble \ProcessKeysPackageOptions \endinput %% %% End of file `l3keys2e.sty'. |