Am 10.10.2025 um 12:07 schrieb [email protected]:
I finally managed to get the output I wanted with the following setup:
\definedescription
[DHint]
[alternative=hanging,
width=\textwidth,
margin=4em,
headcommand=\DHintHead]
\define[1]\DHintHead{#1\blank[15pt]}
\starttext
\startDHint{Head title}
\input ward
\stopDHint
\stoptext
With this, I can control both the indentation and the vertical spacing between
the head and the body in a simple way.
It works nicely for my current document, but I’m wondering if this is considered a good
approach or if there’s a more "ConTeXt-ish" way to achieve the same effect?
You can use the margin key to indent the while block and move the title
back to the left with the \offset command (which can be applied with the
headcommand key).
%%%% begin example
\define[1]\HintCommand
{\offset[x=-4em]{#1}}
\definedescription
[DHint]
[alternative=top,
margin=4em,
headcommand=\HintCommand,
inbetween={\blank[15pt]}]
\starttext
\samplefile{ward}
\startDHint{Head title}
\samplefile{ward}
\stopDHint
\samplefile{ward}
\stoptext
%%%% end example
Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : [email protected] /
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
___________________________________________________________________________________