[NTG-context] Troubles with the \cldcontext command

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Tue Apr 2 22:29:03 CEST 2019


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


More information about the ntg-context mailing list