Chapters headers
From ConTeXt wiki
< Structurals |
Setup of headers like chapters.
While reading Pixar docs about Renderman, I've found their headers nice and wanted to copy this style. I found a premise in Metafun manual, p.187 (Hello text), and Hans email me (20/10/2004 ) on the context list a more simple solution than using metapost. The minimum is to put it here, for others who are like me, wandering for source code. Feel free to adapt code below to your langage specific settings, mine is french.
\useencoding[ffr] \mainlanguage[fr] \enableregime[utf] %for UTF8 % \enableregime[il1] %for ISO 8859-1 8859-15 \usetypescript[palatino][texnansi] \setupbodyfont[palatino,rm,12pt] \setupcolors[state=start] \definefont[BigFontOne][Regular sa 3] %RegularSlanted sa 3(ori)%Sans sa 3:don't work (pb accents) \definefont[BigFontTwo][RegularBold sa 2] %%RegularSlanted \definecolor[BigColorOne][r=.86,g=.850,b=.54] \definecolor[BigColorTwo][r=.43,g=.425,b=.27] \setuphead [chapter] [textcommand=\MyChapterText, color=BigColorTwo, style=\BigFontTwo] \def\MyChapterText#1{\rlap{\BigFontOne\BigColorOne#1}\kern15pt#1} \starttext \chapter[chap:ques]{Question} \chapter[chap:answ]{Answer} \chapter[chap:answ]{Remarque} \chapter[chap:answ]{Cours} \chapter[chap:answ]{Exercice} \chapter[chap:answ]{Travail dirigé} \chapter[chap:answ]{Exposé} \stoptext
I've tryed to change a bit Hans code, by putting \kern15pt, for moving backgroundtext to the left of \rlap alignment, and an unsuccess one to switch same backgroundtext in Sans font (no french accents).
olivier

