From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/24830 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: pushed text in description Date: Thu, 29 Dec 2005 10:56:03 +0100 Message-ID: <43B3B2B3.2040004@elvenkind.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060503050407020601040204" X-Trace: sea.gmane.org 1135850189 15561 80.91.229.2 (29 Dec 2005 09:56:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2005 09:56:29 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 29 10:56:28 2005 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 1EruW5-0006Wn-Vu for gctc-ntg-context-518@m.gmane.org; Thu, 29 Dec 2005 10:56:14 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 84177127E6; Thu, 29 Dec 2005 10:56:12 +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 13435-01; Thu, 29 Dec 2005 10:56:07 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2C97B127D0; Thu, 29 Dec 2005 10:56:07 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 11126127D0 for ; Thu, 29 Dec 2005 10:56:06 +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 13252-05-2 for ; Thu, 29 Dec 2005 10:56:04 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com (elvenknd.xs4all.nl [213.84.171.68]) by ronja.ntg.nl (Postfix) with SMTP id BDB96127CA for ; Thu, 29 Dec 2005 10:56:04 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 6084D18233 for ; Thu, 29 Dec 2005 10:56:04 +0100 (CET) Original-Received: from glenfiddich.elvenkind.com ([127.0.0.1]) by localhost (glenfiddich.elvenkind.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06504-04 for ; Thu, 29 Dec 2005 10:56:04 +0100 (CET) Original-Received: from [10.10.0.6] (glenlivet.elvenkind.com [10.10.0.6]) by glenfiddich.elvenkind.com (Postfix) with ESMTP id 0E29F11D13 for ; Thu, 29 Dec 2005 10:56:04 +0100 (CET) User-Agent: Mozilla Thunderbird 1.0.6-7.1.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: X-Virus-Scanned: by amavisd-new at elvenkind.net 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:24830 Archived-At: This is a multi-part message in MIME format. --------------060503050407020601040204 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Hi Peter, You latex example does what I *thought* \txt did. My guess is Hans misunderstood Giuseppe a bit, and Giuseppe never really tested the code, because what happens now is a bit nonsensical. I believe the attached module does the 'right thing'. You can use \setupitemize[width=4em,distance=1em] to control the two dimensions. Let me know if this is the correct behaviour, ok? Cheers, Taco --------------060503050407020601040204 Content-Type: application/x-tex; name="t-itemfix.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="t-itemfix.tex" %D \module %D [ file=\jobname, %D version=2005.12.29, %D title=\CONTEXT\ Test module, %D subtitle=A temporary module for a bugfix or extension, %D author=Taco Hoekwater, %D date=\currentdate, %D copyright=Taco Hoekwater] %C %C A quick module for a bugfix, not for distribution %D This fixes \type{\txt} behaviour. \unprotect %D This next macro replaces the code for typesetting \type{\txtitem}-s %D It ensures there is `distance' space between the label text and %D the rest of the paragraph, if the label is wider than the `width'. %D Perhaps more if the label is really short, like in a regular %D itemization. \def\dodotxtitem% {\scratchdimen\wd8 \advance \scratchdimen \getitemparameter\itemlevel\c!distance\relax \ifdim\scratchdimen>\dimen0 \advance\scratchdimen -\dimen0 \else \scratchdimen\z@ \fi \llap{\hbox to \dimen0{\ifconditional\sublistitem\llap{+}\fi\box8\hfill}}% \hskip\scratchdimen } %D Nothing changed except the lifting out of the previous macro \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}}% \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} \protect --------------060503050407020601040204 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 --------------060503050407020601040204--