> 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

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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