From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/81478 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Visualcounter: style parameter not working as expected Date: Tue, 02 Apr 2013 10:43:12 +0200 Message-ID: <515A9A20.8090204@wxs.nl> References: <201304020029.36246.romain.diss@yahoo.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1364892203 8996 80.91.229.3 (2 Apr 2013 08:43:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Apr 2013 08:43:23 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 02 10:43:48 2013 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 1UMwok-0005Pi-1M for gctc-ntg-context-518@m.gmane.org; Tue, 02 Apr 2013 10:43:46 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 64968101F3; Tue, 2 Apr 2013 10:43:21 +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 iSoJ4YDdRWIK; Tue, 2 Apr 2013 10:43:18 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id D171E101E6; Tue, 2 Apr 2013 10:43:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A5D8A101E6 for ; Tue, 2 Apr 2013 10:43:17 +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 KzY6KufOg2LA for ; Tue, 2 Apr 2013 10:43:16 +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 22046101E5 for ; Tue, 2 Apr 2013 10:43:16 +0200 (CEST) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r328hFpk003358 for ; Tue, 2 Apr 2013 10:43:15 +0200 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 14038-1713362 for multiple; Tue, 02 Apr 2013 10:43:05 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=11; city=Den Haag; latitude=52.0833; longitude=4.3000; http://maps.google.com/maps?q=52.0833,4.3000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QJiUHfrn - 0ce1b584f858 - 20130402 (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.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:81478 Archived-At: On 4/2/2013 1:30 AM, Aditya Mahajan wrote: > On Tue, 2 Apr 2013, Romain Diss wrote: > >> I'm actually using the visualcounter module for a presentation and I >> can't >> modify the style of the page number inside the countdown counter. The >> documentation let me think the 'style' parameter should do the job but it >> doesn't seem to work. >> >> Do I miss something or is this a bug? > > This is a bug. Thanks for the report. I have fixed it on the github dev > branch, and will upload a new version soon. > > In case anyone is interested, this is what was happening: > > Context parses the parameter of `\useMPgraphic` to determine the MP > instance. The code was using > > \useMPgraphic{\visualcounterparameter\c!mp} > > `\useMPgraphic` does not expand its arguments, so the proper MP instance > was not initialized. Changed the above line to > > \expanded{\useMPgraphic{\visualcounterparameter\c!mp}} > > and now style and color parameters work. even if it would expand, then we still can have an issue when the definer uses a macro as that one doesn't get expanded either, like: \starttext \def\xxx{x} \startuseMPgraphic {\xxx 1} draw fullcircle scaled 1cm ; \stopuseMPgraphic \startuniqueMPgraphic{\xxx 1} draw fullcircle scaled 1cm ; \stopuniqueMPgraphic \def\xxx{xx} \useMPgraphic{x1} \uniqueMPgraphic{x1} \stoptext this is seldom an issue, but for convenience I patched the definers and resolvers so that the first argument gets expanded (next upload) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________