From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/78277 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Strange bug with reversed itemize Date: Fri, 14 Sep 2012 01:11:55 +0200 Message-ID: <123393FA-6BA3-473D-BD6A-55DEE1BC4466@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1347577931 6513 80.91.229.3 (13 Sep 2012 23:12:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Sep 2012 23:12:11 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 14 01:12:15 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 1TCIZv-0007C1-C4 for gctc-ntg-context-518@m.gmane.org; Fri, 14 Sep 2012 01:12:11 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1545610205; Fri, 14 Sep 2012 01:12:07 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id F8yLHHGU4R4x; Fri, 14 Sep 2012 01:12:04 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id C4444101F4; Fri, 14 Sep 2012 01:12:03 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 0E3F0101F4 for ; Fri, 14 Sep 2012 01:12:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id lTVUQsYlXgYi for ; Fri, 14 Sep 2012 01:12:00 +0200 (CEST) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id E38C3101EF for ; Fri, 14 Sep 2012 01:11:59 +0200 (CEST) Original-Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q8DNBwi6020932 for ; Fri, 14 Sep 2012 01:11:58 +0200 Original-Received: by bkcjc3 with SMTP id jc3so944786bkc.14 for ; Thu, 13 Sep 2012 16:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; bh=vwaV5aiiMO8kSlX7xHRSxGRchbaPMClFMQsdtvsPNaA=; b=QOCeXmXx3J3HcwgqSvB/elzb8830pr9hMUkYmRDVK4A6SJH4EgGyHjYuqZTcYe7UqV itz/BtCwlmgzK2odFFEP9PlOByrr7iWdq/cOgKLNAWdxYvTqj5d6qRaoz6msRbFtrtg7 d5mlW5r/xtzqolliptPdsez6kBfm9Bc19IynMu8+TJpcah7AC62NdvCt2YTu1btqZHKb 8tWpmJhnD5FYXJqtyIcPY2Nn759wAgnLLK5nAFb/+9j4JC4OlMW4AGit0gtsmewMe9Kn c20fB94kGX7o7H4uSLBvEwMoa8OIoSqaWrlQQEHKbevatZOwILHR293f88GddVkvhMhq verg== Original-Received: by 10.204.152.19 with SMTP id e19mr388305bkw.8.1347577917970; Thu, 13 Sep 2012 16:11:57 -0700 (PDT) Original-Received: from keima.localdomain (nrbg-4d0570e0.pool.mediaWays.net. [77.5.112.224]) by mx.google.com with ESMTPS id g12sm2380730bkt.7.2012.09.13.16.11.56 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Sep 2012 16:11:57 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1486) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 04HWLbWpA - f7e75f6c212c - 20120914 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:78277 Archived-At: Am 14.09.2012 um 00:36 schrieb Aditya Mahajan : > I have been able to isolate the bug to the update on 2012.07.09; specific= ally to this commit. > = > http://repo.or.cz/w/context.git/blobdiff/6f124794f7dc253f8b83f2517c26ce17= e50d66ff..refs/heads/origin:/tex/context/base/strc-num.mkiv > = > If I replace the current version of strc-num.mkiv with the version from 2= 012.07.09: > http://repo.or.cz/w/context.git/blob_plain/6f124794f7dc253f8b83f2517c26ce= 17e50d66ff:/tex/context/base/strc-num.mkiv > = > then the numbering is correct. > = > However, I cannot figure out what is causing the bug in that change. Part of the problem is this code block: \def\strc_counters_check_setup#1% does it have to happen here? {% this can be done at the lua end / a bit messy here ... todo ... \ifcsname\??counter#1\c!number\endcsname \doifelsevalue {\??counter#1\c!number}{#1} {\letbeundefined{\??co= unter#1\c!number}}% {\doifvaluenothing{\??counter#1\c!number} {\letbeundefined{\??co= unter#1\c!number}}}% \fi \ifcsname\??counter#1\c!number\endcsname % it's a clone \else \edef\currentcounterlevel{\thenamedcounterlevel{#1}}% \edef\p_start{\counterparameter{#1}\c!start}% \ctxcommand{checkcountersetup("#1",\currentcounterlevel,\ifx\p_start\e= mpty0\else\number\p_start\fi,"\counterparameter{#1}\c!state")}% \fi} ConTeXt uses \p_start to store the current value of the start parameter. When you set now a value for start in \setuppagenumber the value is kept in \p_start (because there are no groups). When you start now the itemize environment the same code is loaded and the start parameter (which hasn=92t been set yet) expands to a very stupid default value which is by another helper function. \def\strc_counter_setup_using_parameter#1#2% name \someparameter {\edef\p_start{#2\c!start}% \setupcounter [#1] [ \c!start=3D\ifx\p_start\empty0\else\number\p_start\fi, ... \c!numbersegments=3D#2\c!numbersegments]} As you can see here the start parameter expands to \p_start when it isn=92t= empty what is the case here and because of this you get a wrong value for the ite= m numbers. 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 ___________________________________________________________________________= ________