Radhelorn wrote:
Hello All!
A while ago Hans introduced 'repeat' option for \startitemize to make
nested items. I've decided to give it a try:
next time give it a try when i just made it; it took some time to figure
out what was wrong (rather tricky code)
\unprotect
\def\checkforrepeatedlistitem
{\ifnum\itemlevel=\plusone
\initializeboxstack{item}%
\fi
\ifconditional\repeatlistitem
\savebox{item}{\itemlevel}{\hbox{\copy8}}%
\setbox8\hbox to \wd8
{\setbox\scratchbox\hbox
{\scratchcounter\itemlevel
\advance\scratchcounter\minusone
\dorecurse\scratchcounter{\foundbox{item}{\recurselevel}}}%
\ifnum\itemlevel>\plusone
\ifdim\wd\scratchbox>\zeropoint
\hskip-\dimen2
\box\scratchbox
\fi
\fi
\box8 }%
\fi}
\showframe
\starttext
\startbuffer
\item
\startitemize[n]
\item item 1.1
\item item 1.2
\startitemize[n]
\item item 1.2.1
\item item 1.2.2
\stopitemize
\item item 1.3
\stopitemize
\item
\startitemize[n]
\item item 2.1
\item item 2.2
\stopitemize
\item item 3
\startitemize[n]
\item item 3.1
\item item 3.2
\stopitemize
\item
\startitemize[n]
\item item 4.1
\item item 4.2
\stopitemize
\stopbuffer
\startitemize[n,repeat,6*broad,packed]
\getbuffer
\stopitemize
\blank[3*big]
\startitemize[n,repeat,packed]
\getbuffer
\stopitemize
\blank[3*big]
\setupitemize[each][atmargin][width=3em]
\startitemize[n,repeat,packed]
\getbuffer
\stopitemize
\stoptext
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context