Am Donnerstag, 30. Mai 2024, 22:54:47 MESZ schrieb Wolfgang Schuster:
> Gerion Entrup schrieb am 30.05.2024 um 16:25:
> > The chapter format that I want to achieve in the end is nearly the one in 
> > the attachment (excerpt of Christian Dietrich's PhD thesis).
> 
> When you have a complex layout it is easier to use the 
> \defineheadalternative command to create it.
> 
> To change the font for each element disable the default settings with 
> \setuphead[style=] and use \startfont (or \definedfont) to apply a 
> different style for the number, title etc.
> 
> %%%% begin example
> \defineframed
>    [ChapterFrame]
>    [width=\textwidth,
>     align=flushright,
>     offset=0pt,
>     rulethickness=0pt]
> 
> \startsetups [christian_dietrich]
>    \startlocalheadsetup
>      \startframed[ChapterFrame]
>        \blank[2cm]
>        \startfont[Serif sa 8]
>          \color[darkgray]{\headnumbercontent}
>        \stopfont
>        \blank[5mm]
>        \startfont[SerifBold sa 2]
>          \color[darkred]{\headtextcontent}
>        \stopfont
>        \blank[1cm]
>        \startfont[SerifBold sa 1.5]
>          \color[darkred]{\structureuservariable{subtitle}}
>        \stopfont
>      \stopframed
>    \stoplocalheadsetup
> \stopsetups
> 
> \defineheadalternative
>    [christian_dietrich]
>    [renderingsetup=christian_dietrich]
> 
> \setuphead
>    [chapter]
>    [alternative=christian_dietrich,
>     header=empty,
>     style=]
> 
> \starttext
> 
> \startchapter[title=Chapter title][subtitle=Chapter subtitle]
> \samplefile{lorem}
> \stopchapter
> 
> \stoptext
> %%%% end example

Thank you very much! That looks really clean. I will add it to the wiki.

Can you bring some clarification regarding "style=", "command=" and 
"alternative="?
What, if I define multiple of them? Is the system not made for this?

I just tested my initial example regarding font size with `command=\MyChapter, 
style=` and the font size was only affected by the code of \MyChapter.
What is the default style?

Best
Gerion

Attachment: signature.asc
Description: This is a digitally signed message part.

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to