From 32e6c720c4f84f112596c6b4a75193f99e9be158 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 16 Apr 2019 09:53:19 +0200 Subject: 2019-04-16 09:02:00 --- tex/context/base/mkiv/strc-itm.mkvi | 53 ++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 9 deletions(-) (limited to 'tex/context/base/mkiv/strc-itm.mkvi') diff --git a/tex/context/base/mkiv/strc-itm.mkvi b/tex/context/base/mkiv/strc-itm.mkvi index 0fc204320..13e400c0e 100644 --- a/tex/context/base/mkiv/strc-itm.mkvi +++ b/tex/context/base/mkiv/strc-itm.mkvi @@ -625,10 +625,17 @@ % can be made a bit faster +% \def\strc_itemgroups_setup_each#category#whatever% +% {\doifelseassignment{#whatever} +% {\strc_itemgroups_normal_setup[#category][#whatever]} +% {\strc_itemgroups_normal_setup[#category][\c!option={#whatever}]}} + \def\strc_itemgroups_setup_each#category#whatever% - {\doifelseassignment{#whatever} - {\strc_itemgroups_normal_setup[#category][#whatever]} - {\strc_itemgroups_normal_setup[#category][\c!option={#whatever}]}} + {\ifcondition\validassignment{#whatever}% + \strc_itemgroups_normal_setup[#category][#whatever]% + \else + \strc_itemgroups_normal_setup[#category][\c!option={#whatever}]% + \fi} \def\strc_itemgroups_setup_list_level_a#category#whatever#level% {\strc_itemgroups_normal_setup[#category:#level][#whatever]} @@ -636,10 +643,17 @@ \def\strc_itemgroups_setup_list_level_b#category#whatever#level% {\strc_itemgroups_normal_setup[#category:#level][\c!option={#whatever}]} +% \def\strc_itemgroups_setup_list#subcategories#category#whatever% +% {\doifelseassignment{#whatever} +% {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_a{#category}{#whatever}}} +% {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_b{#category}{#whatever}}}} + \def\strc_itemgroups_setup_list#subcategories#category#whatever% - {\doifelseassignment{#whatever} - {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_a{#category}{#whatever}}} - {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_b{#category}{#whatever}}}} + {\ifcondition\validassignment{#whatever}% + \processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_a{#category}{#whatever}}% + \else + \processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_b{#category}{#whatever}}% + \fi} \def\strc_itemgroups_increment_item_counter {\ifconditional\c_strc_itemgroups_sub \else @@ -774,6 +788,25 @@ \unexpanded\def\startitemgroup {\dotripleempty\strc_itemgroups_start} +% \def\strc_itemgroups_start[#category][#options][#settings]% +% {\begingroup % (1) +% \def\currentitemgroup{#category}% no nested mixing of itemgroups +% \let\currentparentitemgroup\currentitemgroup +% \global\advance\c_strc_itemgroups_nesting\plusone +% \def\currentitemlevel{\number\c_strc_itemgroups_nesting}% +% \normalexpanded{\chaintocurrentitemgroup{\currentparentitemgroup:\currentitemlevel}}% +% \edef\currentitemgroup{\currentparentitemgroup:\currentitemlevel}% +% % +% \ifthirdargument +% \strc_itemgroups_start_indeed[#options][#settings]% +% \else\ifsecondargument +% \doifelseassignment{#options} +% {\strc_itemgroups_start_indeed[][#options]} +% {\strc_itemgroups_start_indeed[#options][]}% +% \else +% \strc_itemgroups_start_indeed[][]% +% \fi\fi} + \def\strc_itemgroups_start[#category][#options][#settings]% {\begingroup % (1) \def\currentitemgroup{#category}% no nested mixing of itemgroups @@ -786,9 +819,11 @@ \ifthirdargument \strc_itemgroups_start_indeed[#options][#settings]% \else\ifsecondargument - \doifelseassignment{#options} - {\strc_itemgroups_start_indeed[][#options]} - {\strc_itemgroups_start_indeed[#options][]}% + \ifcondition\validassignment{#options}% + \strc_itemgroups_start_indeed[][#options]% + \else + \strc_itemgroups_start_indeed[#options][]% + \fi \else \strc_itemgroups_start_indeed[][]% \fi\fi} -- cgit v1.2.3