Thank you both.

I got as far as \dimexpr  (expressions) page in the Wiki, and all the words made sense, more or less, but not the whole.

In case anyone else find this useful, I have success with Wolfgang 2 and 3, with (2) being the simplest....but that may just be the fit to my brain.


It's building stacked progress bars for documents with subsections, in case anyone searches this- colours and prettification to follow!


Ian

On 2 March 2011 11:41, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

Am 02.03.2011 um 12:25 schrieb Ian Lawrence:

> Sorry. me again...and I have been all over the wiki, mailing lists and manuals...
>
> I have this:
>
> \setlayer     [progresssteps] % name of the layer
>               [hoffset=904 px, voffset= 28\nuggetnumber px]  % placement (from upper left corner of the layer)
>               {\stepstack}  % the actual contents of the layer
>
> And I am hoping that as I increase nuggetnumber the voffset of the layer will be 28*nuggetnumber

Variant 1:

\newdimen\baseoffset \baseoffset=28px

\setlayer[…][voffset=4\nuggetnumber]{…}

Variant 2:

\def\nuggetnumber{4}

\setlayer[…][voffset=\dimexpr28px*\nuggetnumber\relax]{…}

Variant 3 (what i suggest):

\definemeasure[baseoffset][28px]
\definemeasure[verticaloffset][\dimexpr\measure{baseoffset}*4\relax] % replace “4” with your own factor

\setlayer[…][voffset=\measure{verticaloffset}]{…}

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________