From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75960 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Bug with linenumbering Date: Thu, 3 May 2012 18:01:49 +0200 Message-ID: References: <4FA0F0B8.4040301@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1336060922 7799 80.91.229.3 (3 May 2012 16:02:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 May 2012 16:02:02 +0000 (UTC) Cc: mailing list for ConTeXt users To: Aditya Mahajan Original-X-From: ntg-context-bounces@ntg.nl Thu May 03 18:02:01 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SPyTf-0003hb-Td for gctc-ntg-context-518@m.gmane.org; Thu, 03 May 2012 18:01:59 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFBC6101E6; Thu, 3 May 2012 18:01:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3A3Lr+Z4gogV; Thu, 3 May 2012 18:01:56 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B8666101E1; Thu, 3 May 2012 18:01:56 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id D7BC3101E1 for ; Thu, 3 May 2012 18:01:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UWMtkPdkZB+s for ; Thu, 3 May 2012 18:01:54 +0200 (CEST) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 24F83101CF for ; Thu, 3 May 2012 18:01:54 +0200 (CEST) Original-Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q43G1r8V032127 for ; Thu, 3 May 2012 18:01:53 +0200 Original-Received: by wgbdt14 with SMTP id dt14so1541949wgb.2 for ; Thu, 03 May 2012 09:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=R9blgRB5bsvl0GXWgbaU0HoDwy+5vTLYrZGpfHXUAD8=; b=sZjEyUMwOOLHEzGpjIl9dEVYtKC0BDi+bvRs51HspnlyimyNdBI2H5Qg2lkFpKOZIt f0V3/el8YPRSZTUtb6RZ2xByXJ01lwrTjNsIPnNCedzoih7RQfPogkjn77HakemUnlr6 KC1IgSOtKp0MWdLh2QOj4LRVoT5x6Tq1MeOJYZnXWrF1MHwV+Z92+Fqq1xDRpaFAkm5n crZgXctNfoTuUN4dwHh8H1Hw7B88jjrDIx8Ie0Y0FUnga+FTGVcaocswenh8NouAsMpF 83j3upfWaD1arZndeG8OPrHbVrMoBFAipiyDv2YDAoCfcn3jtxcFX4N5teH9l/ENRyvG D5zQ== Original-Received: by 10.180.105.194 with SMTP id go2mr4548255wib.22.1336060913196; Thu, 03 May 2012 09:01:53 -0700 (PDT) Original-Received: from [192.168.2.36] (p57AFBADE.dip.t-dialin.net. [87.175.186.222]) by mx.google.com with ESMTPS id 6sm580985wiz.1.2012.05.03.09.01.51 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 May 2012 09:01:52 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1257) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=CA; region=ON; city=Hamilton; postalcode=l8n2g1; latitude=43.2500; longitude=-79.8333; http://maps.google.com/maps?q=43.2500,-79.8333&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QH5s1Rh1 - 2ab62441a8bb - 20120503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:75960 Archived-At: Am 03.05.2012 um 17:18 schrieb Aditya Mahajan: > On Thu, 3 May 2012, Wolfgang Schuster wrote: > = >> You assume \definelinenumbering has a second argument for the settings b= ut this isn=92t the case > = > D'oh. > = >> and you need \setuplinenumbering to set them. > = > I also needed to change \setvalue to \setevalue in the example, and add a= n \expanded to get it to work. In MkIV \setuevalue is better the \setevalue and \normalunexpanded is faste= r than \expanded. The problem in your approach is that you can only set the style and color v= alue with \definewhatever where I think it=92s better to use \setupwhatever. \unprotect \installnamespace {whatever} \installcommandhandler \????whatever {whatever} \????whatever \appendtoks \definelinenumbering[\currentwhatever]% \to \everydefinewhatever \appendtoks \setuevalue{\e!start\currentwhatever}{\whatever_start[\currentwhatever]}% \setuevalue{\e!stop\currentwhatever }{\whatever_stop }% \to \everydefinewhatever \appendtoks \normalexpanded{\setuplinenumbering [\currentwhatever] [\c!color=3D\whateverparameter\c!numbercolor, \c!style=3D\whateverparameter\c!numberstyle]}% \to \everysetupwhatever \unexpanded\def\whatever_start[#1]% {\begingroup \edef\currentwhatever{#1}% \startlinenumbering[\currentwhatever]} \unexpanded\def\whatever_stop {\stoplinenumbering \endgroup} \protect \definewhatever[testing][numbercolor=3Dred,numberstyle=3Dbold] \setupwhatever [testing][numbercolor=3Dblue] \starttext \starttesting \input knuth \stoptesting \stoptext Wolfgang ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________