ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Visualcounter: style parameter not working as expected
@ 2013-04-01 22:29 Romain Diss
  2013-04-01 23:30 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Romain Diss @ 2013-04-01 22:29 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

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.diss@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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Visualcounter: style parameter not working as expected
  2013-04-01 22:29 Visualcounter: style parameter not working as expected Romain Diss
@ 2013-04-01 23:30 ` Aditya Mahajan
  2013-04-02  8:43   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2013-04-01 23:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Visualcounter: style parameter not working as expected
  2013-04-01 23:30 ` Aditya Mahajan
@ 2013-04-02  8:43   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2013-04-02  8:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-02  8:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-01 22:29 Visualcounter: style parameter not working as expected Romain Diss
2013-04-01 23:30 ` Aditya Mahajan
2013-04-02  8:43   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).