summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/core-lst.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/core-lst.tex')
-rw-r--r--Master/texmf-dist/tex/context/base/core-lst.tex69
1 files changed, 46 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/context/base/core-lst.tex b/Master/texmf-dist/tex/context/base/core-lst.tex
index 359e9b8ceb5..d9fdca3753a 100644
--- a/Master/texmf-dist/tex/context/base/core-lst.tex
+++ b/Master/texmf-dist/tex/context/base/core-lst.tex
@@ -33,6 +33,8 @@
% number uses the text container. We use reference mapping
% (define reference) to keep track of the current ref.
+% \@@sectie == current level
+
\def\dowritetolist#1%
{\doifelsevalue{\??li#1\c!state}\v!start
\dodowritetolist\gobblefourarguments{#1}}
@@ -41,7 +43,7 @@
{\begingroup
\expanded{\everylistentry\emptytoks\the\everylistentry}% \emptytoks, else loop
\def\currentlist{#1}% evt naar dowritetolist
- \convertexpanded{\getvalue{\??li\currentlist\c!expansion}}{#3}\asciilistentry
+ \defconvertexpanded\asciilistentry{\getvalue{\??li\currentlist\c!expansion}}{#3}%
\makesectionformat
\doifelse\@@nmstate\v!start
{\def\dopagenummer{\noexpand\pagenumber}}
@@ -64,7 +66,7 @@
\thisisnextinternal\currentlist
\fi
\expanded
- {\writeutilitycommand
+ {\writeutilitycommand % todo: also an immediate option
{\noexpand\listentry
{\currentlist}%
{\nextinternalreference}%
@@ -91,7 +93,7 @@
\def\dowritebetweenlist#1#2%
{\doifvalue{\??li#1\c!state}\v!start
{\begingroup
- \convertargument#2\to\ascii
+ \defconvertedargument\ascii{#2}%
\makesectionformat
\doifelse{\@@nmstate}\v!start
{\def\dopagenummer{\noexpand\pagenumber}}
@@ -109,7 +111,7 @@
\def\immediatetolist[#1]#2#3#4%
{\begingroup
- \convertexpanded{\getvalue{\??li#1\c!expansion}}{#3}\asciilistentry
+ \defconvertexpanded\asciilistentry{\getvalue{\??li#1\c!expansion}}{#3}%
\makesectionformat
\immediatewriteutilitycommand
{\listentry
@@ -120,7 +122,7 @@
\def\immediatebetweenlist[#1]#2%
{\begingroup
- \convertargument#2\to\asciilistentry
+ \defconvertedargument\asciilistentry{#2}%
\makesectionformat
\immediatewriteutilitycommand
{\listbetween
@@ -276,7 +278,7 @@
\c!textstyle,\c!textcolor,\c!textcommand,
\c!pagestyle,\c!pagecommand,\c!pagecolor,
\c!numberstyle,\c!numbercolor,\c!numbercommand,
-\c!headnumber,
+ \c!headnumber,
\c!pagenumber,\c!pageboundaries,\c!margin,\c!symbol,\c!limittext,
\c!aligntitle,\c!before,\c!after,\c!inbetween,\v!part\c!number,\c!label]%
\getparameters[\??li#1][#3]}}%
@@ -800,24 +802,45 @@
\midaligned
{}}
+% \def\dodofixdlistelementEFG#1#2#3#4#5#6#7#8% keep this one here as reference
+% {\noindent
+% \hbox
+% {#1% in case E nils the strut
+% \let\\=\newlineinlist
+% \setbox0\hbox
+% {#2{\showcontrastlocation\??ia{#8}%
+% {\dostartlistattributes\c!style\c!color\empty
+% \ignorespaces\dontconvertfont\setstrut
+% \begstrut
+% %\doifelsenothing{\listparameter\c!maxwidth}
+% % {\listparameter\c!textcommand{#6}}
+% % {\listparameter\c!textcommand{\limitatetext{#6}{\listparameter\c!maxwidth}{\unknown}}}%
+% \limitatedlistentry{#6}%
+% \endstrut % struts new
+% \dostoplistattributes}}}%
+% \linklisttoelement{#4}{#7}{#8}{\box0}}%{\copy0}}%
+% \par % should be an option
+% \listparameter\c!inbetween}
+
\def\dodofixdlistelementEFG#1#2#3#4#5#6#7#8%
{\noindent
- \hbox
- {#1% in case E nils the strut
- \let\\=\newlineinlist
- \setbox0\hbox
- {#2{\showcontrastlocation\??ia{#8}%
- {\dostartlistattributes\c!style\c!color\empty
- \ignorespaces\dontconvertfont\setstrut
- \begstrut
- %\doifelsenothing{\listparameter\c!maxwidth}
- % {\listparameter\c!textcommand{#6}}
- % {\listparameter\c!textcommand{\limitatetext{#6}{\listparameter\c!maxwidth}{\unknown}}}%
- \limitatedlistentry{#6}%
- \endstrut % struts new
- \dostoplistattributes}}}%
- \linklisttoelement{#4}{#7}{#8}{\box0}}%{\copy0}}%
- \par % should be an option
+ \bgroup
+ \def\makelistelement##1##2% isolated by Wolfgang Schuster
+ {\doifelse{\listparameter\c!interaction}{##1}
+ {#2{##2}}
+ {\setbox0\hbox{#2{\showcontrastlocation\??ia{#8}{##2}}}%
+ \linklisttoelement{#4}{#7}{#8}{\box0}}}%
+ \makelistelement\v!no
+ {\let\\=\newlineinlist
+ #1% in case E nils the strut (still needed?)
+ \dostartlistattributes\c!style\c!color\empty
+ \ignorespaces\dontconvertfont\setstrut
+ \begstrut
+ \limitatedlistentry{#6}%
+ \endstrut
+ \dostoplistattributes}%
+ \egroup
+ \par
\listparameter\c!inbetween}
% better:
@@ -836,7 +859,7 @@
\def\writetolist[#1]#2#3%
{\doifsomething{#1}
- {\convertargument#2\to\firstlistelement
+ {\defconvertedargument\firstlistelement{#2}%
\@EA\dowritetolist\@EA{#1}{\firstlistelement}{#3}{\v!head}}}
\def\dobetweenlist#1#2#3#4% pas op: wordt ook elders gedefinieerd