Visualcounter: style parameter not working as expected
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
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
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 -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Romain Diss