Am Donnerstag, 30. Mai 2024, 18:49:08 MESZ schrieb Bruce Horrocks: > > > On 30 May 2024, at 15:15, Gerion Entrup <gerion.ent...@flump.de> wrote: > > > > Let's begin with a minimal example: > > ``` > > \define[2]\MyChapter{% > > #1 #2: \structureuservariable{subtitle} (\structureuservariable{intro}) > > } > > Stop there! > > Use \definehead to create your own variation of a heading - much more robust. > Something like the following (untested): > > \startsetups PlaceSubTitleAndIntro > % Set font and and style etc for the subtitle here > \structureuservariable(subtitle) > > % Set font and style etc for the intro text here > \structureuservariable(intro) > \stopsetups > > \definehead [MyChapter] [chapter] > \setuphead [MyChapter] > [ style={...}, % heading style > after={\setup{PlaceSubTitleAndIntro}}, > ] > > \starttext > \startMyChapter[title={Foo}] > [ subtitle={Bar}, > intro={Some explanation}, > ] > The text of the chapter > \stopMyChapter > \stoptext
Thanks for the input. A comparable example is also listed in the wiki. I like the approach for placing subtitle and intro alone. However, I also want to style chapter number and chapter title separately. I'm also not sure, if an extra heading (MyChapter) is needed, since all my chapters are styled in this way. Isn't it possible to define "after" of chapter directly? Best Gerion
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 ___________________________________________________________________________________