diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi | 102 |
1 files changed, 62 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi index d29b1f6fdae..e3a466656c3 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi +++ b/Master/texmf-dist/tex/context/base/mkiv/strc-lst.mkvi @@ -76,7 +76,7 @@ %\c!inbetween=, %\c!symbol=, %\c!expansion=, - \c!limittext=\languageparameter\c!limittext] % not used currently + \c!limittext=\languageparameter\c!limittext] % not used currently %D Helpers: @@ -242,7 +242,7 @@ %D When placing a list either one or a set can be giving. This makes %D it possible to flush for instance an nested (or merged) table of %D contents. Keep in mind that placing a list is what we do most (think -%D of tables of contents, figures, etc.\ but other usag eis also possible +%D of tables of contents, figures, etc.\ but other usage is also possible %D in which case low level commands have to be used. \newtoks\everystructurelist @@ -367,6 +367,17 @@ \unexpanded\def\savedlisttitle #1#2{\clf_savedlisttitle {#1}\numexpr#2\relax} \unexpanded\def\savedlistprefixednumber#1#2{\clf_savedlistprefixednumber{#1}\numexpr#2\relax} +\newconditional\c_lists_show_realpage + +\installcorenamespace {listpagenumber} + +\setvalue{\??listpagenumber\v!always }{\settrue\c_lists_show_page\settrue\c_lists_has_page} +\setvalue{\??listpagenumber\v!yes }{\settrue\c_lists_show_page} +\setvalue{\??listpagenumber\s!realpage}{\settrue\c_lists_show_page\settrue\c_lists_show_realpage} + +\def\strc_lists_process_pagenumber#1% + {\begincsname\??listpagenumber#1\endcsname} + \def\structurelistlocation {\clf_listlocation\numexpr\currentlistindex\relax} @@ -375,23 +386,27 @@ \unexpanded\def\structurelistpagenumber {\dostarttagged\t!listpage\empty - \clf_listprefixedpage - {\currentlist}% - \currentlistindex - { - separatorset {\listparameter\c!pageprefixseparatorset} - conversionset {\listparameter\c!pageprefixconversionset} - set {\listparameter\c!pageprefixset} - segments {\listparameter\c!pageprefixsegments} - connector {\listparameter\c!pageprefixconnector} - }% - { - prefix {\listparameter\c!pageprefix} - conversionset {\listparameter\c!pageconversionset} - starter {\listparameter\c!pagestarter} - stopper {\listparameter\c!pagestopper} - }% - \relax + \ifconditional\c_lists_show_realpage + \clf_listrealpage{\currentlist}\numexpr\currentlistindex\relax + \else + \clf_listprefixedpage + {\currentlist}% + \currentlistindex + { + separatorset {\listparameter\c!pageprefixseparatorset} + conversionset {\listparameter\c!pageprefixconversionset} + set {\listparameter\c!pageprefixset} + segments {\listparameter\c!pageprefixsegments} + connector {\listparameter\c!pageprefixconnector} + }% + { + prefix {\listparameter\c!pageprefix} + conversionset {\listparameter\c!pageconversionset} + starter {\listparameter\c!pagestarter} + stopper {\listparameter\c!pagestopper} + }% + \relax + \fi \dostoptagged} \unexpanded\def\structurelistuservariable#name% @@ -402,8 +417,8 @@ \def\rawstructurelistuservariable#name% {\clf_listuserdata{\currentlist}\currentlistindex{#name}} -\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s! -\unexpanded\def\structurelistsecond {\structurelistuservariable\s!second} % s! +\unexpanded\def\structurelistfirst {\structurelistuservariable\s!first } % s! +\unexpanded\def\structurelistsecond{\structurelistuservariable\s!second} % s! \def\rawstructurelistfirst {\rawstructurelistuservariable\s!first } % s! % was \unexpanded \def\rawstructurelistsecond{\rawstructurelistuservariable\s!second} % s! % was \unexpanded @@ -612,14 +627,14 @@ {\strut\symbol[bullet]} \unexpanded\def\strc_lists_symbol_two - {\vrule\!!width\emwidth\!!height\exheight\!!depth\zeropoint} + {\vrule\s!width\emwidth\s!height\exheight\s!depth\zeropoint\relax} \unexpanded\def\strc_lists_symbol_three {\begingroup \strc_lists_assign_dimen\scratchwidth \c!width {1.5\emwidth}% \strc_lists_assign_dimen\scratchheight\c!height\exheight \strc_lists_assign_dimen\scratchdepth \c!depth \zeropoint - \vrule\!!width\scratchwidth\!!height\scratchheight\!!depth\scratchdepth + \vrule\s!width\scratchwidth\s!height\scratchheight\s!depth\scratchdepth \endgroup} \unexpanded\def\strc_lists_symbol_unknown @@ -877,7 +892,7 @@ \appendtoks % better is to use a special list entry but we keep this for compatibility - \let\\=\space + \enforced\let\\\space % so expanding this token register has to come *after* the font switch \dontconvertfont % (**) this has to become an option (see publ) \to \t_lists_every_renderingtext @@ -891,17 +906,22 @@ % because these tests happen often and because we're dealing with % rather complex composed data we have special conditionals; keep % in mind that testing for empty fails do to tagging being applied - \edef\p_pagenumber{\listparameter\c!pagenumber}% - \ifx\p_pagenumber\v!always - \settrue\c_lists_has_page - \settrue\c_lists_show_page - \else +% \edef\p_pagenumber{\listparameter\c!pagenumber}% +% \ifx\p_pagenumber\v!always +% \settrue\c_lists_has_page +% \settrue\c_lists_show_page +% \else +% \doifelsestructurelisthaspage\settrue\setfalse\c_lists_has_page +% \ifx\p_pagenumber\v!yes +% \settrue\c_lists_show_page +% \else +% \setfalse\c_lists_show_page +% \fi +% \fi + \setfalse\c_lists_show_page % necessary? + \processcommacommand[\listparameter\c!pagenumber]\strc_lists_process_pagenumber + \ifconditional\c_lists_has_page \else \doifelsestructurelisthaspage\settrue\setfalse\c_lists_has_page - \ifx\p_pagenumber\v!yes - \settrue\c_lists_show_page - \else - \setfalse\c_lists_show_page - \fi \fi % always forces number placement (in bib we use a forced number) \edef\p_headnumber{\listparameter\c!headnumber}% @@ -933,6 +953,7 @@ \setfalse\c_lists_has_page \setfalse\c_lists_has_number \setfalse\c_lists_show_page + \setfalse\c_lists_show_realpage \setfalse\c_lists_show_number \to \t_lists_every_renderingcleanup @@ -1118,7 +1139,7 @@ \hangafter\ifx\p_hang\v!no\zerocount\else\plusone\fi \scratchdimen\listalternativeparameter\c!distance\relax \ifzeropt\wd\b_strc_lists_page \else \ifdim\scratchdimen>\zeropoint\relax - \rightskip\scratchdimen\!!plus\listalternativeparameter\c!stretch\relax + \rightskip\scratchdimen\s!plus\listalternativeparameter\c!stretch\relax \parfillskip-\rightskip \fi \fi \else @@ -1241,9 +1262,9 @@ \endgroup \scratchdistance\listparameter\c!distance\relax \ifdim\scratchdistance<\emwidth - \hskip\emwidth\!!plus\emwidth\!!minus.25\emwidth\relax + \hskip\emwidth\s!plus\emwidth\s!minus.25\emwidth\relax \else - \hskip\scratchdistance\!!plus.5\scratchdistance\!!minus.25\scratchdistance\relax + \hskip\scratchdistance\s!plus.5\scratchdistance\s!minus.25\scratchdistance\relax \fi \endgroup \endgroup @@ -1346,7 +1367,8 @@ %D such (for now). No interaction either as that is dealt with elsewhere. %D %D \currentlistsymbol -%D \currentlistentry +%D \currentlistentrynumber +%D \currentlistentrytitle %D \currentlistentrypagenumber % not really used \definelistalternative @@ -1522,14 +1544,14 @@ \def\strc_lists_set_reference_attribute_indeed#element% {\ifx#element\p_interaction_forward - \attribute\referenceattribute\a_strc_lists_reference + \c_attr_reference\a_strc_lists_reference \fi} \def\strc_lists_get_destination_attribute_indeed {attr \destinationattribute\number\a_strc_lists_destination} \def\strc_lists_set_destination_attribute_indeed - {\attribute\destinationattribute\a_strc_lists_destination} + {\c_attr_destination\a_strc_lists_destination} \unexpanded\def\strc_lists_set_style_color_normal#style#color#element% {\useliststyleandcolor#style#color} |