Am 08.02.2013 um 07:31 schrieb Devendra Ghate
Hello everyone,
I have defined a macro for the chapter layouts -- nothing fancy, but still it is giving me trouble. Essentially, I call this macro using *command=* in *\setuphead*. My philosophy was to add all the details in the macro, so that I don't have to call anyother keyvalue pairs in *\setuphead*. However, the macro gives two different results when called for typesetting a chapter heading by ConTeXt internals and explicitly by me in the document (see attached file).
I don't know why the chapter number font style is not obeyed. If I add *numberstyle=dfont* in *\setuphead*, then the font size is increased but the frame size has spurious space at top and bottom.
When I call the macro myself, there is a single whitespace before the chapter heading (as can be seen in the attached file).
I have gone through the wiki as much as possible and I think that I could have easily copied *much better* heading styles from it. But I do not want to use code that I don't fully understand.
Any suggestions/help will be most appreciated.
\definefont [ChaperNumberStyle][Serif at 60pt] \definecolor[ChaperNumberColor][x=d8dcd6] \startsetups[head:devendra] \startlinealignment[left] \startframed [frame=on, rulethickness=3pt, framecolor=ChaperNumberColor, foregroundcolor=ChaperNumberColor, corner=00] \hspace[big]\headnumbercontent \stopframed \hspace[big] \startframed [width=.1\textwidth, strut=no, frame=on, align={flushleft,nothyphenated,verytolerant}] \headtextcontent \stopframed \stoplinealignment \stopsetups \defineheadalternative[devendra][renderingsetup=head:devendra] \setuphead [chapter] [alternative=devendra, numberstyle=ChaperNumberStyle, textstyle={\tfc\kap\kerncharacters[.5]}] \starttext \chapter{Introduction to thesis} \stoptext Wolfgang