Changes

Jump to navigation Jump to search
1,287 bytes added ,  18:13, 8 June 2020
m
no edit summary
</texcode>
 
<context>
% by Hans Hagen, of course :-)
 
\unprotected \def\rawsectionnumber#1{\countervalue{\??se#1}} % will be in kernel
 
\setuppagenumbering
[alternative=doublesided]
 
\setupcolors
[state=start]
 
\setupbackgrounds
[page]
[background=thumbs]
 
\defineoverlay
[thumbs]
[\setups{thumbs}]
 
\def\NOfChapters{4} % i need to make this one available
 
\startsetups thumbs
 
\definemeasure[thumbheight][\dimexpr\paperheight/\NOfChapters\relax]
 
\vbox to \paperheight \bgroup
\vskip \rawsectionnumber{section-2} \measure{thumbheight}
\vskip -1 \measure{thumbheight}
\doifoddpageelse\hfill\donothing
\framed
[background=color,
backgroundcolor=darkgray,
frame=off,
foregroundcolor=white,
height=\measure{thumbheight},width=1cm]
{\bfa \rawsectionnumber{section-2}}
\doifoddpageelse\donothing\hfill
\vss
\egroup
 
\stopsetups
 
\starttext
 
\chapter{first} \dorecurse{10}{\input tufte }
\chapter{second} \dorecurse{10}{\input davis }
\chapter{third} \dorecurse{10}{\input zapf }
\chapter{fourth} \dorecurse{10}{\input bryson }
 
\stoptext
</context>
== Another Example ==
\stoptext
</texcode>
 
[[Category:Sample documents]]
[[Category:Graphics]]

Navigation menu