diff options
Diffstat (limited to 'tex/context/base/strc-itm.mkvi')
-rw-r--r-- | tex/context/base/strc-itm.mkvi | 89 |
1 files changed, 30 insertions, 59 deletions
diff --git a/tex/context/base/strc-itm.mkvi b/tex/context/base/strc-itm.mkvi index da81f37d5..86acba33c 100644 --- a/tex/context/base/strc-itm.mkvi +++ b/tex/context/base/strc-itm.mkvi @@ -182,7 +182,6 @@ \newconditional\c_strc_itemgroups_columns \newconditional\c_strc_itemgroups_concat \newconditional\c_strc_itemgroups_txt -\newconditional\c_strc_itemgroups_extra \newconditional\c_strc_itemgroups_repeat % 0 = before/after @@ -243,17 +242,11 @@ \strc_itemgroups_insert_reference_indeed \fi \fi} -\def\strc_itemgroups_insert_extra_reference - {\iftrialtypesetting \else \ifx\currentitemreference \empty \else - \normalexpanded{\textreference[\currentitemreference]{\strc_itemgroups_extra_symbol}}% - \fi \fi} - \def\strc_itemgroups_insert_reference_indeed % maybe we need a 'frozen counter' numberdata blob / quick hack .. .mive this to strc-ref {%\setnextinternalreference % no need to collect nodes in \b_strc_destination_nodes here ... maybe at some point \strc_references_start_destination_nodes - % this is somewhat over the top ... we should use the counter's reference - \ctxcommand{setreferenceattribute("\s!full", "\referenceprefix","\currentitemreference", + \ctxlua {structures.references.setandgetattribute("\s!full", "\referenceprefix","\currentitemreference", { metadata = { kind = "item",% ? @@ -367,7 +360,7 @@ \def\strc_itemgroups_insert_break_indeed {\flushnotes \vspacing[\v!item @-5]} \def\strc_itemgroups_insert_nobreak_indeed {\flushnotes - \ifinsidecolumns % todo + \ifinsidecolumns \vspacing[\v!item @5]% \else \vspacing[\v!item @500]% @@ -459,7 +452,6 @@ % this will be a constant \setfalse\c_strc_itemgroups_head \setfalse\c_strc_itemgroups_sub - \setfalse\c_strc_itemgroups_symbol \setfalse\c_strc_itemgroups_columns % to be checked \let\m_strc_itemgroups_destination\empty @@ -592,11 +584,9 @@ {\processcommalist[#subcategories]{\strc_itemgroups_setup_list_level_b{#category}{#whatever}}}} \def\strc_itemgroups_increment_item_counter - {\ifconditional\c_strc_itemgroups_sub \else - \ifconditional\c_strc_itemgroups_symbol \else % \ifx\strc_itemgroups_extra_symbol\empty - \strc_counters_increment_sub\v_strc_itemgroups_counter\currentitemlevel - \fi - \fi} + {\ifconditional\c_strc_itemgroups_sub \else \ifx\strc_itemgroups_extra_symbol\empty + \strc_counters_increment_sub\v_strc_itemgroups_counter\currentitemlevel + \fi\fi} \unexpanded\def\strc_itemgroups_insert_item_counter {\ifconditional\c_strc_itemgroups_repeat @@ -842,6 +832,9 @@ \let\startcollectitems\relax \let\stopcollectitems \relax +\ifdefined\startcolumns \else \unexpanded\def\startcolumns[#settings]{} \fi +\ifdefined\stopcolumns \else \unexpanded\def\stopcolumns {} \fi + \letvalue{\??itemgroupalign\v!flushleft }\relax \letvalue{\??itemgroupalign\v!right }\relax \letvalue{\??itemgroupalign\v!flushright}\hfill @@ -880,31 +873,16 @@ \def\strc_itemgroups_setup_symbol_asked {\edef\strc_itemgroups_asked_symbol{\itemgroupparameter\c!symbol}} -\ifdefined\strc_itemgroups_start_columns +\def\strc_itemgroups_start_columns + {\startcolumns + [\c!n=\itemgroupparameter\c!n, + \c!height=, + \c!rule=\v!off, + \c!balance=\v!yes, + \c!align=\v!no]} - % already defined in page-mix - -\else - - % will be redefined in page-mix - - \ifdefined\startcolumns \else - \unexpanded\def\startcolumns[#settings]{} - \unexpanded\def\stopcolumns {} - \fi - - \def\strc_itemgroups_start_columns - {\startcolumns - [\c!n=\itemgroupparameter\c!n, - \c!height=, - \c!rule=\v!off, - \c!balance=\v!yes, - \c!align=\v!no]} - - \def\strc_itemgroups_stop_columns - {\stopcolumns} - -\fi +\def\strc_itemgroups_stop_columns + {\stopcolumns} \unexpanded\def\stopitemgroup {\stopcollectitems @@ -1112,7 +1090,6 @@ \unexpanded\def\strc_itemgroups_start_symbol#text% {\def\strc_itemgroups_extra_symbol{#text}% - \settrue\c_strc_itemgroups_symbol \startitemgroupitem} \unexpanded\def\strc_itemgroups_start_dummy @@ -1140,7 +1117,6 @@ \unexpanded\def\strc_itemgroups_start_text#text% {\def\strc_itemgroups_extra_symbol{#text}% - \settrue\c_strc_itemgroups_symbol \settrue\c_strc_itemgroups_txt \startitemgroupitem} @@ -1243,33 +1219,29 @@ \unexpanded\def\strc_itemgroups_start_head_sym#text% {\def\strc_itemgroups_extra_symbol{#text}% - \settrue\c_strc_itemgroups_symbol \settrue\c_strc_itemgroups_head \strc_itemgroups_start_head} \def\strc_itemgroups_make_symbol_box {\setbox\b_strc_itemgroups\hbox {\ifconditional\c_strc_itemgroups_head - \ifconditional\c_strc_itemgroups_symbol - \strc_itemgroups_insert_extra_reference - \useitemgroupstyleandcolor\c!symstyle\c!symcolor - \strc_itemgroups_extra_symbol - \else + \ifx\strc_itemgroups_extra_symbol\empty \useitemgroupstyleandcolor\c!headstyle\c!headcolor \strc_itemgroups_used_symbol - \fi - \else - \ifconditional\c_strc_itemgroups_symbol - \strc_itemgroups_insert_extra_reference + \else \useitemgroupstyleandcolor\c!symstyle\c!symcolor \strc_itemgroups_extra_symbol - \else + \fi + \else + \ifx\strc_itemgroups_extra_symbol\empty \useitemgroupstyleandcolor\c!style\c!color \strc_itemgroups_used_symbol + \else + \useitemgroupstyleandcolor\c!symstyle\c!symcolor + \strc_itemgroups_extra_symbol \fi \fi}% - \let\strc_itemgroups_extra_symbol\empty - \setfalse\c_strc_itemgroups_symbol} + \let\strc_itemgroups_extra_symbol\empty} \def\strc_itemgroups_make_fitting_box {\ifdim\wd\b_strc_itemgroups>\itemgroupparameter\c!maxwidth\scaledpoint\relax % brr, sp @@ -1481,11 +1453,10 @@ \else \advance\c_strc_itemgroups_collected_current\plusone \fi - \ifcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname - \getvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}% - \letbeundefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}% - \advance\c_strc_itemgroups_collected_done\plusone - \fi + \doifdefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current} + {\getvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}% + \letbeundefined{\??itemgroupstack\number\c_strc_itemgroups_collected_current}% + \advance\c_strc_itemgroups_collected_done\plusone}% \ifnum\c_strc_itemgroups_collected_done<\c_strc_itemgroups_collected_stored \expandafter\strc_itemgroups_collected_flush \fi} |