Thomas A. Schmitz wrote:
> Now I'd be so happy if someone (well I guess
> Hans) could teach me how to have this neat progressbar that's in pre-
> color on my own slides; I don't seem to be able to isolate the code
> that produces it.

Do you mean those "funny little things" which run from the beginning
to the end as the presentation runs from the first towards the last
slide?

There are "PageNumber" and "NOfPages" variables defined somewhere in
metafun. So you can say something like:

    if(NOfPages > 2) and (PageNumber > 0):
        fraction := (PageNumber-1)/(NOfPages-1)
    else:
        fraction := 1;
    fi;

And then you can do with it whatever you want. You can for example
change slide colour:

    SlideColour := fraction[\MPcolor[my color 1],\MPcolor[my color 2]];

or draw a progress bar:

    fill unisquare xscaled fraction xyscaled size withcolor red;
    draw unitsquare xyscaled size;

An alternative are \pageno and \lastpage, defined inside ConTeXt.

Hope this helps,
    Mojca
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to