ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Re: Two questions to counter in margin
       [not found]       ` <888db778-31e7-4f13-b32e-85bd5e8fb460@fiee.net>
@ 2025-05-31 15:12         ` Wolfgang Schuster
  0 siblings, 0 replies; only message in thread
From: Wolfgang Schuster @ 2025-05-31 15:12 UTC (permalink / raw)
  To: ntg-context

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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-31 15:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <32edb7c1-c3ff-4212-bf0a-c2fb619901dd@t-online.de>
     [not found] ` <416C532B-4E57-45B6-8548-BA380DA6B62A@scorecrow.com>
     [not found]   ` <D9D9B6F8-60A4-4637-B3D6-DD59276BADBB@scorecrow.com>
     [not found]     ` <9feaf01a-90f4-43cb-902c-c84497230bd3@t-online.de>
     [not found]       ` <888db778-31e7-4f13-b32e-85bd5e8fb460@fiee.net>
2025-05-31 15:12         ` [NTG-context] Re: Two questions to counter in margin Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).