From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12368 Path: main.gmane.org!not-for-mail From: Giuseppe Bilotta Newsgroups: gmane.comp.tex.context Subject: Re: Bug in Enumerations Date: Wed, 28 May 2003 19:02:00 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <16820812827.20030528190200@iol.it> References: <20030528134800.GA2497@prioris.mini.pw.edu.pl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1054141828 7341 80.91.224.249 (28 May 2003 17:10:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 28 May 2003 17:10:28 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Wed May 28 19:10:26 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19L4QL-0001nG-00 for ; Wed, 28 May 2003 19:09:13 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id D34CE10B1B; Wed, 28 May 2003 19:11:12 +0200 (MEST) Original-Received: from smtp1.libero.it (smtp1.libero.it [193.70.192.51]) by ref.ntg.nl (Postfix) with ESMTP id 2648010B18 for ; Wed, 28 May 2003 19:03:44 +0200 (MEST) Original-Received: from [151.29.131.81] (151.29.131.81) by smtp1.libero.it (7.0.012) id 3ECB938A002793D0 for ntg-context@ntg.nl; Wed, 28 May 2003 19:03:31 +0200 X-Mailer: The Bat! (v1.63 Beta/7) X-Priority: 3 (Normal) Original-To: ntg-context@ntg.nl In-Reply-To: <20030528134800.GA2497@prioris.mini.pw.edu.pl> 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:12368 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12368 Wednesday, May 28, 2003 Slawek Zak wrote: SZ> There is a bug in enumerations' implementation. The following example SZ> is nearly literally taken from english ConTeXt manual SZ> (cont-eni.pdf, p. 224) SZ> See this example: SZ> \defineenumeration[step] SZ> [location=left,text={},width=2em] SZ> \setupenumerations[step] [headstyle=bold] SZ> \setupenumerations[substep][headstyle=slanted] SZ> \starttext SZ> \step One \par SZ> \substep Two \par SZ> \stoptext SZ> The headstyle for substep is bold, just like for step, and not slanted SZ> as stated in the manual. As a temporary patch, put the following in your cont-loc and tell me how it works out. If you don't have a cont-loc, put it in your cont-new. =============================================================================== \def\special@@definitiewoord#1#2#3#4[#5]#6#7% {\strut \doifelsevalue{\??dd#1\c!nummer}\v!nee \!!doneafalse {\doifelse{#5}{-} \!!doneafalse \!!doneatrue}% \chardef\definitiekoppeling\zerocount \iflocation \doifvaluesomething{\??dd#1\c!koppeling} {\processaction % genereert > of < [\getvalue{\??dd#1\c!koppelwijze}] [ \v!lokaal=>\chardef\definitiekoppeling1, % old: default \v!globaal=>\chardef\definitiekoppeling2]}% new: global crosslinking \fi \stelnummerin % the number is called indirectly [\getvalue{\??dd#1\??dd\c!nummer}] [\c!sectienummer=\getvalue{\??dd#1\c!sectienummer}]% \if!!donea \getvalue{\e!volgende#2#1}% \iflocation \bgroup \letvalue{\??dd#1\c!sectienummer}\v!ja \protectconversion \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber \ifcase\definitiekoppeling \or \xdef\internaldoornummer{#3{#1}}% \rawreference\s!num{#1:\internaldoornummer}{}% \or \xdef\internaldoornummer{\countervalue{\??dd\c!koppeling#1}}% \rawreference\s!num{#1:\internaldoornummer}{}% \fi \egroup \fi \maakvoorafgaandenummer[\getvalue{\??dd#1\??dd\c!nummer}]% \preparethenumber{\??dd#1}\voorafgaandenummer\preparednumber \hbox {\let\normalkap\relax % sorry, uppercase causes troubles \doattributes % \nocase primitive needed {\??dd#2#1}\c!kopletter\c!kopkleur {\getvalue{\??dd#1\c!commando}% hook for taco {\showdntext{#2#1}% \domakednnummer{#1}{#2}{#3}}}% \iflocation\ifcase\definitiekoppeling \else \edef\localconnection{\getvalue{\??dd#1\c!koppeling}:\internaldoornummer}% \doifreferencefoundelse\localconnection {\in[\localconnection]}{}% genereert > of < \fi\fi}% \doifnot{#5}{-}{\rawreference\s!num{#5}{#3{#1}}}% \else % Why was this strange expansion needed? \hbox {\edef\!!stringa{\showdnpuretext{#2#1}}% nog eens testen binnen \expanded \expanded{\doattributes{\??dd#1}\noexpand\c!kopletter\noexpand\c!kopkleur {\noexpand\getvalue{\??dd#1\c!commando}{\!!stringa}}}% \doifnot{#5}{-}{\rawreference\s!num{#5}{}}}% \fi} =============================================================================== FOR HANS: I added a #2 in the \doattributes for kopletter and kopkleur. -- Giuseppe "Oblomov" Bilotta