From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24951 Path: news.gmane.org!not-for-mail From: Radhelorn Newsgroups: gmane.comp.tex.context Subject: Re: About 'repeat' option of \startitemize Date: Wed, 04 Jan 2006 22:12:48 +0300 Message-ID: <43BC1E30.3000501@mail.ru> References: <43A91277.4010707@mail.ru> <43A955F5.3080805@wxs.nl> <43A99102.6010809@mail.ru> <43A999A4.50505@wxs.nl> <43AB1169.30504@mail.ru> <43AB1637.9040904@wxs.nl> <43AB1D82.9000205@mail.ru> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030406040305090700070307" X-Trace: sea.gmane.org 1136402002 16872 80.91.229.2 (4 Jan 2006 19:13:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 Jan 2006 19:13:22 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 04 20:13:21 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org 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 1EuE4B-0002Hd-QT for gctc-ntg-context-518@m.gmane.org; Wed, 04 Jan 2006 20:13:02 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E3F6612885; Wed, 4 Jan 2006 20:12:57 +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 10435-08; Wed, 4 Jan 2006 20:12:55 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B4EEA12869; Wed, 4 Jan 2006 20:12:54 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AC40512869 for ; Wed, 4 Jan 2006 20:12:52 +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 10486-02 for ; Wed, 4 Jan 2006 20:12:51 +0100 (CET) Original-Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by ronja.ntg.nl (Postfix) with SMTP id 6F9AF1277C for ; Wed, 4 Jan 2006 20:12:51 +0100 (CET) Original-Received: from [217.106.91.40] (port=49211 helo=[172.16.6.89]) by mx3.mail.ru with psmtp id 1EuE41-000OIu-00 for ntg-context@ntg.nl; Wed, 04 Jan 2006 22:12:49 +0300 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <43AB1D82.9000205@mail.ru> 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:24951 Archived-At: This is a multi-part message in MIME format. --------------030406040305090700070307 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Radhelorn wrote: > I have another observation in > behaviour of 'repeat' option but will try to experiment with this a > little more. This itm module is too elaborate. > After Taco's t-itmfix I've came up with my own little fix. Please observe. -- Radhelorn --------------030406040305090700070307 Content-Type: text/x-tex; name="rptfix.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rptfix.tex" \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} --------------030406040305090700070307 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --------------030406040305090700070307--