My last question! :-) I would like to have the various ‘parts’ of a book marked with black rectangles at the right side of each page, visible when the reader flips through the pages. I googled successfully to find ‘fancyhdr’, but that’s a LaTeX package, so I don’t think it will work in ConTeXt. If it’s not too difficult in ConTeXt, can anyone share the secret? thanks!
Am 11.02.2005 um 23:19 schrieb cormullion:
My last question! :-) I would like to have the various ‘parts’ of a book marked with black rectangles at the right side of each page, visible when the reader flips through the pages.
Perhaps you find out looking at the code in http://contextgarden.net/ConTeXt_info_style (there are nav tabs at the bottom). Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net
Henning Hraban Ramm
Am 11.02.2005 um 23:19 schrieb cormullion:
My last question! :-) I would like to have the various ‘parts’ of a book marked with black rectangles at the right side of each page, visible when the reader flips through the pages.
Perhaps you find out looking at the code in http://contextgarden.net/ConTeXt_info_style (there are nav tabs at the bottom).
Thanks - I’m looking at it. It looks fairly advanced though :-) (I’ve only been using ConTeXt for a few days...). How are you making a chapter (say) show a mark depending on its number?
Am 12.02.2005 um 00:09 schrieb cormullion:
Perhaps you find out looking at the code in http://contextgarden.net/ConTeXt_info_style (there are nav tabs at the bottom). Thanks - I’m looking at it. It looks fairly advanced though :-) (I’ve only been using ConTeXt for a few days...). How are you making a chapter (say) show a mark depending on its number?
Sorry, I'm not that deep in ConTeXt myself, the code is mostly by Hans. I hope someone other can help you. Perhaps describe a bit more exactly what you'd like to achieve. As far as I understood: You want a black rectangle at the margin that has no text in it, always same size, but moving position per chapter? Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net
cormullion wrote:
My last question! :-) I would like to have the various ‘parts’ of a book marked with black rectangles at the right side of each page, visible when the reader flips through the pages. I googled successfully to find ‘fancyhdr’, but that’s a LaTeX package, so I don’t think it will work in ConTeXt. If it’s not too difficult in ConTeXt, can anyone share the secret?
you may only read this answer if you also put it in the wiki \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 ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
h h extern
\unprotected \def\rawsectionnumber#1{\countervalue{\??se#1}} % will be in kernel [...]
Awesome (and scary) stuff. Works great, too.
you may only read this answer if you also put it in the wiki
OK, I’ll have a go. Thanks for your help again.
participants (3)
-
cormullion
-
h h extern
-
Henning Hraban Ramm