[NTG-context] Manipulating the pagenumber in the TOC

Wolfgang Schuster wolfgang.schuster.lists at gmail.com
Sun Apr 21 19:59:50 CEST 2019


Willi Egger schrieb am 21.04.2019 um 19:28:
> Hi all,
>
> "when manipulating in one area you will have to manipulate also in other aeras” I must confess.
>
> I asked some time ago about manipulating the pagenumber. Wolfgang provide me the following approach:
>
>
> \cldcontext{“\letterpercent.0f”,(\pagenumber+1)/2}
>
> This works indeed fine. However now I am confronted with the fact, that in the TOC the manipulated pagenumbers should be taken into account.

\def\dwarsliggernumber#1%
   {\number\numexpr(#1+1)/2\relax}

\defineconversion [dwarsligger] [\dwarsliggernumber]

\setuppapersize[A5,landscape]

\setupuserpagenumber[numberconversion=dwarsligger]

\setuppagenumbering[location=none]

\setupheadertexts [\doifoddpageelse{}{\prefixedpagenumber}]
\setupfootertexts [\doifoddpageelse{\prefixedpagenumber}{}]

\usemodule [visual]

\starttext

\completecontent

\dorecurse{10}
   {\chapter{\fakewords{5}{10}}
    \fakelines{50}{100}}

\stoptext

Wolfgang



More information about the ntg-context mailing list