\def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken {\ifconditional\textlistitem % begin of item \else \par \fi % \ignorespaces \increment\noflistelements \ifnum\itemcolumndepth=\zerocount \ifconditional\optimizelistitem \ifnum\noflistelements=\plusone % tgv bv kolommen/nesting \findtwopassdata\s!list{\noflists:}% % wordt soms de volgorde \fi % verstoord, vandaar \find \iftwopassdatafound \ifcase0\twopassdata\relax \twopassdatafoundfalse \fi \fi \iftwopassdatafound \ifnum\twopassdata=3 \ifnum\noflistelements>1 \doitembreak\itemnobreak \fi \else\ifnum\twopassdata>3 \ifnum\noflistelements=2 \ifconditional\introlistitem \doitembreak\nobreak \else \doitembreak\itemnobreak \fi \else\ifnum\twopassdata=\noflistelements\relax \doitembreak\itemnobreak \else\ifnum\noflistelements>2 \doitembreak\itembreak \else \ifconditional\introlistitem\else\doitembreak\itembreak\fi \fi\fi\fi \fi\fi \fi \fi\fi \noindent \setbox8\hbox {\ifconditional\headlistitem \ifconditional\symbollistitem \symsymbol \else \doitemattributes\itemlevel\c!headstyle\c!headcolor{\listitem}% \fi \else \ifconditional\symbollistitem \symsymbol % no attributes, why? \else \doitemattributes\itemlevel\c!style\c!color{\listitem}% \fi \fi}% \doifsomething\somdestination {\setbox8\hbox{\goto{\box8}[\somdestination]}}% \globallet\somdestination\empty \dimen2=\getitemparameter\itemlevel\c!width\relax % new, prevents loops when symbol is (not yet found) graphic \ht8=\strutheight \dp8=\strutdepth % so that content differs per run (esp mp graphics afterwards) \checkforrepeatedlistitem \ifdim\dimen2<\zeropoint\relax \llap{\ifconditional\sublistitem\llap{+}\fi\box8\hskip\leftmargindistance}% \else \ifdim\dimen2=\zeropoint\relax \calculatelistwidth1{\dimen0}% \else \calculatelistwidth\itemlevel{\dimen0}% \fi \ifconditional\textlistitem \hbox{\ifconditional\sublistitem+\fi\box8\hskip\fontdimen2\font}\nobreak \else\ifconditional\inlinelistitem \hbox to \dimen0{\ifconditional\sublistitem\llap{+}\fi\box8\hfill}% \else\ifconditional\txtlistitem \dodotxtitem % \hskip-\dimen0 this makes them touch \else % todo: align+marge binnen de hbox \llap{\hbox to \dimen0{\ifconditional\sublistitem\llap{+}\fi\box8\hfill}}% \hskip\fullwidth % added for 'repeat' option fix \fi\fi\fi \fi \forceunexpanded % needed for m conversion (\os) / i need to look into this \setevalue{\@@currentitemsymbol\itemlevel}% {\getvalue{\@@localitemsymbol\itemlevel}}% still problems with \uchar ? %{\noexpand\getvalue{\@@localitemsymbol\itemlevel}}% no, spoils subrefs \resetunexpanded \setfalse\headlistitem \setfalse\sublistitem \setfalse\symbollistitem \EveryPar{\ignorespaces}% needed ? \ignorespaces} % I don't think this is the best way but it will require minimal % change to the original sources. \def\checkforrepeatedlistitem {\global\newdimen\fullwidth \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 \global\advance\fullwidth\wd\scratchbox \box\scratchbox \fi \fi \box8}% \fi}