From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13358 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Probelm with \defineenumeration Date: Fri, 19 Sep 2003 10:36:32 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5.2.0.9.1.20030919103404.027b03a0@server-1> References: <001801c37e10$8211ffa0$0100a8c0@vademecum> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1063969364 13712 80.91.224.253 (19 Sep 2003 11:02:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Sep 2003 11:02:44 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Fri Sep 19 13:02:42 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A0J2A-00018X-00 for ; Fri, 19 Sep 2003 13:02:42 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 64F2510B34; Fri, 19 Sep 2003 13:02:38 +0200 (MEST) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id E980210B34 for ; Fri, 19 Sep 2003 12:50:00 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id h8JAns012542 for ; Fri, 19 Sep 2003 12:49:54 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id C99061A5CC; Fri, 19 Sep 2003 12:49:51 +0200 (CEST) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 44DBA1850E for ; Fri, 19 Sep 2003 10:49:46 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Original-To: ntg-context@ntg.nl In-Reply-To: <001801c37e10$8211ffa0$0100a8c0@vademecum> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:13358 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13358 At 20:13 18/09/2003 +0200, you wrote: >I have defined an enumeration. After typesetting the enumerated list I get >on the first line the enumeration text and lost and alone in front of the >second line the enumeration number. > >Is this something I do in a wrong way or is there a bug? hm, this is due to the fact that the [ ] are not taken into the width calculations. This problem was introduced some time ago when i made a slightly more advanced width multiline calculator. In your case it's also triggered by text=\em which should be textstyle=\em (now an extra space is added between the text and number) The next alternative fixes the width calculation. \def\@@dostartdefinitie#1[#2]#3% {\getvalue{\??dd#1\c!voor}% \begingroup \doadaptleftskip{\getvalue{\??dd#1\c!marge}}% \showcomposition \!!widthb\getvalue{\??dd#1\c!afstand}\relax \ifdim\!!widthb=\zeropoint\relax \doifvalue{\??dd#1\c!breedte}\v!ruim{\!!widthb=1em}% \fi % temp hack, we need to avoid this kind of preprocessing \setbox\@@definitiebox\hbox % preroll {\forgetall \trialtypesettingtrue \mindermeldingen \def\\{\crcr}% \@@definitiewoord{#1}[#2]{#3}% {\begstrut\getvalue{\??dd#1\c!tekst}\ignorespaces#3\endstrut}}% % so far \assignwidth {\!!widtha} {\getvalue{\??dd#1\c!breedte}} {\doifelsevaluenothing{\??dd#1\c!monster} {% preroll can move here (test first) \ifhbox\@@definitiebox\unhcopy\else\copy\fi \@@definitiebox} {\@@definitiewoord{#1}[#2]{#3}% {\getvalue{\??dd#1\c!tekst}\getvalue{\??dd#1\c!monster}}}} {\!!widthb}% \setbox\@@definitiebox\hbox {\forgetall \mindermeldingen \let\\\endgraf \doifelsevalue{\??dd#1\c!plaats}\v!aanelkaar {\@@definitiewoord{#1}[#2]{#3}% {\begstrut\getvalue{\??dd#1\c!tekst}#3\endstrut}} {\@@definitiewoord{#1}[#2]{#3}% {\vtop{\hsize\!!widtha\advance\hsize-\!!widthb \begstrut\getvalue{\??dd#1\c!tekst}\ignorespaces#3\endstrut}}}}% \doifelsevalue{\??dd#1\c!titeluitlijnen}\v!nee {\edef\@@leftdefinitieskip {\the\leftskip }% \edef\@@rightdefinitieskip{\the\rightskip}} {\ifcase\insidedefinition \edef\@@leftdefinitieskip {\the\leftskip }% \edef\@@rightdefinitieskip{\the\rightskip}% \fi}% \expanded{\inspringen[\getvalue{\??dd#1\c!inspringen}]}% \ifcase\insidedefinition % better a system mode \chardef\insidedefinition\plusone \or \chardef\insidedefinition\plustwo \fi} % now happens elsewhere : \noindent\ignorespaces ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------