Re: [NTG-context] Visualcounter: style parameter not working as expected

2013-04-02 Thread Hans Hagen

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
___


[NTG-context] Visualcounter: style parameter not working as expected

2013-04-01 Thread Romain Diss
Hi all,

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?

%% Minimal working exemple %%
\usemodule[visualcounter]

\definevisualcounter
  [test]
  [countdown]
  [counter=userpage]

\setupvisualcounter
  [test]
  [style=\tfd] % This is not taken into account

\setupfootertexts[][\usevisualcounter{test}]

\starttext
  \dorecurse{3}{\input knuth \par \input knuth \page}
\stoptext
%%

Thanks in advance.

-- 
Romain Diss
romain.d...@yahoo.fr
___
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
___


Re: [NTG-context] Visualcounter: style parameter not working as expected

2013-04-01 Thread Aditya Mahajan

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.

Aditya
___
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
___