Willi Egger schrieb am 02.04.19 um 21:17:
Hello!

I have the following code, which should manipulate the page number. However I 
get an error:


MWE:

\setuppapersize [A6] [A6]

\setuppagenumbering[location=none]

\startsetups [Pagenumber]
   \doifrightpageelse
     {\cldcontext{"\letterpercent d",(\pagenumber+1)/2}}
     {}
\stopsetups

[...]

What do i miss here? I am stumid…

I guess %d wasn’t the right way to round the number, you can use

\startsetups [Pagenumber]
  \doifoddpageelse
    {\cldcontext{"\letterpercent.0f",(\pagenumber+1)/2}}
    {}
\stopsetups

or

\startsetups [Pagenumber]
  \doifoddpageelse
    {\cldcontext{"\letterpercent r",(\pagenumber+1)/2}}
    {}
\stopsetups

Search in cld-mkiv.pdf for formatters to find more options.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to