
Hi helpers, I have the following: \setupbodyfont[cursor,12pt] \setuplayout[ backspace=1.5in, width=5in, leftmargin=0.5in, rightmargin=0.5in, topspace=0.5in, grid=yes, ] \definecounter[Scenecounter][way=bytext,type=number] \setcounter[Scenecounter][1] \definedescription [Szene] [headstyle={\bf\WORD\rawcountervalue[Scenecounter]}, headalign=right, alternative=top, hang=none, before=\startnarrow[left=0in,right=.5in][left,right]\blank, after=\stopnarrow\blank,%\incrementcounter[Scenecounter] ] \starttext \Szene{Int. Café Glockenspiel - Tag} Sie betritt das Café und sucht offenbar nach jemandem. \rawcountervalue[Scenecounter] %\incrementcounter[Scenecounter] \Szene{Int. Café Glockenspiel - Nacht} Er verlässt das Café und sucht offenbar nach niemandem. \rawcountervalue[Scenecounter] \stoptext I would like to get my counter in the right and left margin of the bold scene title. How can I make this work? And why can't the counter be incremented in the \definedescription? Or is it still possible? Thank you for every help! Greetings Thomas

Am 28.05.25 um 09:56 schrieb Thomas Meyer:
\Szene{Int. Café Glockenspiel - Tag} Sie betritt das Café und sucht offenbar nach jemandem. \rawcountervalue[Scenecounter] %\incrementcounter[Scenecounter]
I would like to get my counter in the right and left margin of the bold scene title. How can I make this work?
And why can't the counter be incremented in the \definedescription? Or is it still possible?
Hi Thomas, while I think that “descriptions” make sense for dialogues in a play, I don’t think they make sense for structuring. Why don’t you use chapters, sections etc. for acts and scenes? You’d get the counter for free. Hraban

On 28 May 2025, at 08:56, Thomas Meyer
wrote: I would like to get my counter in the right and left margin of the bold scene title. How can I make this work?
And why can't the counter be incremented in the \definedescription? Or is it still possible?
The most annoying thing on the Internet is when you ask a question and someone doesn't answer the question but instead questions what you're doing and why. Well... :-) Is there a particular reason you're using \definedescription instead of the document structure that Context provides? Specifically: why not use \chapter for each act of the play and then \section for each scene? The reason I suggest it is that \heading gives you much more control over the numbering and position of the number and would solve the questions you are asking. Document structure is summarised here: https://wiki.contextgarden.net/Command/_section and there is more on numbering options here https://wiki.contextgarden.net/Document_structure_and_headlines/Section_numb... You can use \definehead and \setuphead to create a replacement \Szene so you probably don't have to change what you've already written very much. Regards, — Bruce Horrocks Hampshire, UK

Thank you Hraban, Bruce and Wolfgang, I started with the dialogue and description works well. So I was totally fixated on description and didn't realise that it could be simpler. But with section and enumeration I have the same problem: I need the count in the margin and on both sides, right AND left! Maybe I'm standing like an ox in front of a barn door ... Greetings Thomas Am 28.05.25 um 11:59 schrieb Bruce Horrocks:
On 28 May 2025, at 10:53, Bruce Horrocks
wrote: The reason I suggest it is that \heading gives you much more control \section not \heading
— 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 ___________________________________________________________________________________

Am 28.05.25 um 17:08 schrieb Thomas Meyer:
Thank you Hraban, Bruce and Wolfgang,
I started with the dialogue and description works well. So I was totally fixated on description and didn't realise that it could be simpler. But with section and enumeration I have the same problem: I need the count in the margin and on both sides, right AND left! Maybe I'm standing like an ox in front of a barn door ...
Well, you can’t avoid special solutions for special demands ;) Something like: \setuphead[Scene][command=\MySceneTitle] \define[2]\MySceneTitle{% \inleft{#1}\inright{#1}{\bfd #2} } (#1 is the formatted section number, #2 is the title) HTH, Hraban

Oh, thank you, Hraban, that is so helpful. That's what I wanted! Greetings Thomas PS. Have a nice Father's Day! Am 28.05.25 um 19:05 schrieb Henning Hraban Ramm:
Am 28.05.25 um 17:08 schrieb Thomas Meyer:
Thank you Hraban, Bruce and Wolfgang,
I started with the dialogue and description works well. So I was totally fixated on description and didn't realise that it could be simpler. But with section and enumeration I have the same problem: I need the count in the margin and on both sides, right AND left! Maybe I'm standing like an ox in front of a barn door ...
Well, you can’t avoid special solutions for special demands ;)
Something like:
\setuphead[Scene][command=\MySceneTitle]
\define[2]\MySceneTitle{% \inleft{#1}\inright{#1}{\bfd #2} }
(#1 is the formatted section number, #2 is the title)
HTH, Hraban ___________________________________________________________________________________
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 ___________________________________________________________________________________

Am 28.05.2025 um 19:05 schrieb Henning Hraban Ramm:
Am 28.05.25 um 17:08 schrieb Thomas Meyer:
Thank you Hraban, Bruce and Wolfgang,
I started with the dialogue and description works well. So I was totally fixated on description and didn't realise that it could be simpler. But with section and enumeration I have the same problem: I need the count in the margin and on both sides, right AND left! Maybe I'm standing like an ox in front of a barn door ...
Well, you can’t avoid special solutions for special demands ;)
Something like:
\setuphead[Scene][command=\MySceneTitle]
\define[2]\MySceneTitle{% \inleft{#1}\inright{#1}{\bfd #2} }
(#1 is the formatted section number, #2 is the title)
Alternative solution with custom section layout. %%%% begin example \defineheadalternative [scene] [alternative=vertical, renderingsetup=scene:title] \startsetups [scene:title] \startlocalheadsetup \startmaxaligned \llap{\headnumbercontent\hskip{\leftmargindistance}}% \rlap{\hskip{\textwidth+\rightmargindistance}\headnumbercontent}% \vbox\bgroup \headtextcontent \egroup \stopmaxaligned \stoplocalheadsetup \stopsetups \showframe [text] [leftmargin,text,rightmargin] \definehead [Scene] [section] [alternative=scene] \starttext \Scene{Int. Café Glockenspiel -- Tag} Sie betritt das Café und sucht offenbar nach jemandem. \stoptext %%%% end example Wolfgang

Am 28.05.2025 um 09:56 schrieb Thomas Meyer:
Hi helpers,
I have the following:
\setupbodyfont[cursor,12pt] \setuplayout[ backspace=1.5in, width=5in, leftmargin=0.5in, rightmargin=0.5in, topspace=0.5in, grid=yes, ]
\definecounter[Scenecounter][way=bytext,type=number] \setcounter[Scenecounter][1]
\definedescription [Szene] [headstyle={\bf\WORD\rawcountervalue[Scenecounter]}, headalign=right, alternative=top, hang=none, before=\startnarrow[left=0in,right=.5in][left,right]\blank, after=\stopnarrow\blank,%\incrementcounter[Scenecounter] ]
\starttext
\Szene{Int. Café Glockenspiel - Tag} Sie betritt das Café und sucht offenbar nach jemandem. \rawcountervalue[Scenecounter] %\incrementcounter[Scenecounter]
\Szene{Int. Café Glockenspiel - Nacht} Er verlässt das Café und sucht offenbar nach niemandem. \rawcountervalue[Scenecounter]
\stoptext
I would like to get my counter in the right and left margin of the bold scene title. How can I make this work?
And why can't the counter be incremented in the \definedescription? Or is it still possible?
If you need descriptions with a counter use enumerations, they are based on the same mechanism and add a number for each entry. Wolfgang
participants (4)
-
Bruce Horrocks
-
Henning Hraban Ramm
-
Thomas Meyer
-
Wolfgang Schuster