From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24560 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: About 'repeat' option of \startitemize Date: Wed, 21 Dec 2005 14:17:41 +0100 Message-ID: <43A955F5.3080805@wxs.nl> References: <43A91277.4010707@mail.ru> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135171126 10823 80.91.229.2 (21 Dec 2005 13:18:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2005 13:18:46 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Dec 21 14:18:43 2005 Return-path: Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ep3qq-0005yz-AN for gctc-ntg-context-518@m.gmane.org; Wed, 21 Dec 2005 14:17:52 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1191A12882; Wed, 21 Dec 2005 14:17:51 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25617-08; Wed, 21 Dec 2005 14:17:45 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D96D812861; Wed, 21 Dec 2005 14:17:45 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 124BF12861 for ; Wed, 21 Dec 2005 14:17:45 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25621-03 for ; Wed, 21 Dec 2005 14:17:44 +0100 (CET) Original-Received: from mail.pragma-ade.net (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by ronja.ntg.nl (Postfix) with ESMTP id E56D012851 for ; Wed, 21 Dec 2005 14:17:42 +0100 (CET) Original-Received: from [10.100.1.102] (unverified [10.100.1.102]) by controller-1 (SurgeMail 3.5b3) with ESMTP id 8668 for ; Wed, 21 Dec 2005 14:25:03 +0300 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43A91277.4010707@mail.ru> X-Server: High Performance Mail Server - http://surgemail.com r=-274017400 X-Authenticated-User: hagen@controller-1 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:24560 Archived-At: 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