From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/75952 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 14:43:20 +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 1336049019 2547 80.91.229.3 (3 May 2012 12:43:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 May 2012 12:43:39 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu May 03 14:43:39 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 1SPvNh-0006wB-14 for gctc-ntg-context-518@m.gmane.org; Thu, 03 May 2012 14:43:37 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 735A9101EA; Thu, 3 May 2012 14:43:36 +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 xvl1HLMslWaN; Thu, 3 May 2012 14:43:32 +0200 (CEST) Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0F79D101E0; Thu, 3 May 2012 14:43:32 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2CC5E101E0 for ; Thu, 3 May 2012 14:43:30 +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 Dvr0pcxhVfak for ; Thu, 3 May 2012 14:43:29 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id 57D38101CF for ; Thu, 3 May 2012 14:43:29 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q43ChRJX019804 for ; Thu, 3 May 2012 14:43:28 +0200 Original-Received: by bkcjm19 with SMTP id jm19so1852569bkc.14 for ; Thu, 03 May 2012 05:43:27 -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=X8I1HnjOkl82vB+wgEp31ZLnWifnzA73Y/RUglXuO64=; b=Mo08kMSyn3qTR8e9MyTAm8RnsWg7EJB3euuhDgA73oKTDdNNLyh4DceP5EmTQEAQ5H CW0MZTTTJTfkEJ10EooltRGt3nHX5Qpy8Prd0C8YreIujznBZ8JWk9nVMAkvPgrXVxzl Ngxs81VRDnvakP3iynjNmnd+VT4EzvPj8QnsmxaVM8S0Oo6LHcObsTh7QR59DaDTvMm7 8cAVsztGi1MYbO8hXth/n103ObBTur5n5RwOJVRfAOHVOMa/tl3QBvRsNCiub6vl9amh 9P9KfMe+WAAH+rd+OWV2ibqdvRHRWqA+tuAognz2mE5YTQe99qnmQpSqkbgV0NrAcGN0 rqxg== Original-Received: by 10.205.121.130 with SMTP id gc2mr696631bkc.10.1336049007715; Thu, 03 May 2012 05:43:27 -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 ie3sm10307334bkc.1.2012.05.03.05.43.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 May 2012 05:43:26 -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=209.85.214.41; 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: 0TH5oHsof - f3eba1334622 - 20120503 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 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:75952 Archived-At: Am 03.05.2012 um 06:58 schrieb Aditya Mahajan: > On Wed, 2 May 2012, Hans Hagen wrote: > = >> On 1-5-2012 21:43, Aditya Mahajan wrote: >>> Hi, >>> Line numbering does not respect the parameters given with >>> \startlinenumbering. For example: >> = >> Line numbering is a delayed operation. As they are handled when the page= is constructed the settings of that moment apply. In practice only the sta= rt key is handled when you pass settings to \start.... (the only reason for= having the second argument is number start/restart etc). If you want diff= erent renderings, the best is to define a specific instance of line numberi= ng. > = > A little background: In the initial version of the vim module, I used to = do line numbering manually (each line started with \NL macro, which expande= d to a number in an appropriate style depending on whether line numbering w= as enabled or not. When I rewrote the module to use the filter module, I al= so rewrote the line numbering mechanism to use ConTeXt's inbuilt line numbe= ring macros, but I cannot get them to work. > = > Consider the following example. I want to define an environment, which, a= mongst other things does line numbering. I want the user to control the sty= le and color of line numbering, so I define keys numberstyle and numbercolo= r, which are then passed on to the line numbering macros. The most obvious = implementation of this does not work. > = > [=85] > = > \appendtoks > \definelinenumbering > [\currentwhatever] > [ > color=3D\whateverparameter{numbercolor}, > style=3D\whateverparameter{numberstyle}, > ]% > \setvalue{start\currentwhatever}{\dostartwhatever[\currentwhatever]}% > \setvalue{stop\currentwhatever}{\dostopwhatever}% > \to\everydefinewhatever You assume \definelinenumbering has a second argument for the settings but = this isn=92t the case and you need \setuplinenumbering to set them. 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 ___________________________________________________________________________= ________