Mojca Miklavec wrote:
Frank Grieshaber wrote:
Hello all (esp. the ConTeXt-Developers),
some time ago I sent the following email to this list and got no reply so I'm resending it.
Is there any possibility that this feature will be part of the next/one of the next ConTeXt-versions?
Frank
I'm affraid that despite the huge amount of features that "itemize" offers, it should be rewritten one day. Sometimes it doesn't really work as expected (some comments can be found in my post "\setupitemize[packed,paragraph]") and the features you are mentioning here are missing, although they would be sensible.
Dear all, I have a manuscript with long nested numbered enumerations and I want the numbers of all levels to be printed automatically like:
1. one 1.1 one-one 1.2 one-two 2. two 2.1 two-one 2.2.1 two-two-one ...
Using the following prints only the current level's number, not all levels:
\startitemize[n,packed] \item \item \startitemize[m,packed] \item \item \stopitemize \item \item \stopitemize
PS: But once again - If anyone will be reading this post in the mail archive: please, don't use this trick!!! Please check first if this feature has been added in the meantime.
sorry for being mean again ... % copy this into cont-new.tex \unprotect \def\dododosetupitemgroupconstant[#1][#2#3#4]% * permits [2] {\processaction [#2#3#4] [ \v!packed*=>\packitems, \v!intro*=>\itemintrotrue, \v!autointro*=>\autoitemintrotrue, \v!broad*=>\setitemparameter{#1}\c!factor{1}, #2#3*\v!broad*=>\setitemparameter{#1}\c!factor{#2#3}, #2*\v!broad*=>\setitemparameter{#1}\c!factor{#2}, \v!text*=>\textitemstrue \settrue\inlinelistitem \dosetuppackeditemgroup{#1}% \packitems, \v!columns*=>\packitems, \v!margin*=>\setitemparameter{#1}\c!width{-2em}, % signal \v!inmargin*=>\setitemparameter{#1}\c!width{-2em}, % signal \v!atmargin*=>\doifnot{#1}{1}{\setitemparameter{#1}\c!width{0em}}, % signal \v!intext*=>\settrue\inlinelistitem, % new \v!loose*=>\optimizeitemsfalse, \v!paragraph*=>\paragraphitemstrue \packitems, \v!joinedup*=>\dosetuppackeditemgroup{#1}% \packitems, \v!serried*=>\setitemparameter{#1}\c!factor{-1}, #2#3*\v!serried*=>\setitemparameter{#1}\c!factor{-#2#3}, #2*\v!serried*=>\setitemparameter{#1}\c!factor{-#2}, \v!stopper*=>\setitemparameter{#1}\c!placestopper\v!yes, \v!unpacked*=>\packeditemsfalse, \v!repeat*=>\settrue\repeatlistitem, % new \v!standard*=>\dosetupstandarditemgroup{#1}]} \def\dolistitem % evt aantal items opslaan per niveau, scheelt zoeken {\iftextitems % begin of item \else \par \fi \ignorespaces \increment\noflistelements \ifnum\itemcolumndepth=\zerocount \ifoptimizeitems \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 \ifitemintro \doitembreak\nobreak \else \doitembreak\itemnobreak \fi \else\ifnum\twopassdata=\noflistelements\relax \doitembreak\itemnobreak \else\ifnum\noflistelements>2 \doitembreak\itembreak \else \ifitemintro\else\doitembreak\itembreak\fi \fi\fi\fi \fi\fi \fi \fi\fi \noindent \setbox8\hbox {\ifheaditem \doitemattributes\itemlevel\c!headstyle\c!headcolor{\listitem}% \else\ifsymbolitem \symsymbol \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{\ifsubitem\llap{+}\fi\box8\hskip\leftmargindistance}% \else \ifdim\dimen2=\zeropoint\relax \calculatelistwidth1{\dimen0}% \else \calculatelistwidth\itemlevel{\dimen0}% \fi \iftextitems \hbox{\ifsubitem+\fi\box8\hskip\fontdimen2\font}\nobreak \else \ifconditional\inlinelistitem \hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}% \else % todo: align+marge binnen de hbox \llap{\hbox to \dimen0{\ifsubitem\llap{+}\fi\box8\hfill}}% \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 \headitemfalse \subitemfalse \symbolitemfalse \EveryPar{\ignorespaces}% \ignorespaces} \newconditional\repeatlistitem \def\checkforrepeatedlistitem {\ifnum\itemlevel=\plusone \ifnum\itemlevel=\plusone \initializeboxstack{item}% \fi \fi \ifconditional\repeatlistitem \savebox{item}{\itemlevel}{\hbox{\ifnum\itemlevel>\plusone \copy8\else\fi}}% \setbox8\hbox {\setbox\scratchbox\hbox{\foundbox{item}{\itemlevel}}% \ifnum\itemlevel>\plusone \hskip-\wd\scratchbox \ifnum\countervalue{\@@itemcounter\itemlevel}>\plusone \llap{\box\scratchbox}% \fi \fi \box8}% \fi} \protect % end of copy \starttext \startitemize[n,packed] \item test \item \startitemize[m,packed,repeat] \item test \item test \stopitemize \item test \item \startitemize[m,packed] \item test \item test \stopitemize \stopitemize \stoptext Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------