Changes

Jump to navigation Jump to search
83 bytes added ,  08:39, 20 July 2022
remove todo template
{{todo | this page needs to be cleaned up}}
The following code is an example of how to draw a graphic on every page of a document. The graphic (a grey rectangle) appears in a different place for each chapter, and the chapter number appears in the rectangle as well. This is often called a thumb index - your thumb can flip the pages of a book while you watch the contents flash past...
An example (MkIV) for using Metapost to create thumb indices for chapters.
<texcodecontext source="yes">% these first lines are just for wiki layout and visualisation\setuppapersize[A8][A4]\showframe\setuppaper[A4nx=4,oversizedny=4]\setuparranging[XY]\usemodule[visual]
\setuplayout
\starttext \showframe
\dorecurse{63}{\chapter{Test Chapter #1}
Chapter \someheadnumber[chapter][current] of
\someheadnumber[chapter][last]
Section \someheadnumber[section][current] of
\someheadnumber[section][last] \blank
\input tufte \par \input knuth fakewords{10}{20} \par
}
}
\stoptext
</texcodecontext>
[[Category:Sample documents]]
[[Category:Graphics]]

Navigation menu