ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Structureuservariable and long lines
@ 2025-03-12 13:23 denis.maier
  2025-03-12 15:16 ` [NTG-context] " Denis Maier via ntg-context
  2025-03-12 15:20 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: denis.maier @ 2025-03-12 13:23 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 722 bytes --]

Hi,

I have section headings where I need to output some descriptions after the label and before the heading title (which may be missing in some cases). I've thought the something like the example below should work, but the text from the variable overflows.
What am I missing here?
Is there maybe an easier way to reach that goal?

Best,
Denis

\define[2]\sectionCMD
    {#1\par
    \structureuservariable{something}\par
    #2
}

\setuphead [section]
        [
        command=\sectionCMD,
        ]

\starttext
\startsection
  [title=Hello]
  [something=ajskdflö asjdfkl asjdföla asdf asdf asdf asdf asdf ksdföalks djföalskd föalskdföl asdjkfaöls djkfaölsdjf,]

asdf
\stopsection
\stoptext


[-- Attachment #1.2: Type: text/html, Size: 3680 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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] 5+ messages in thread

* [NTG-context] Re: Structureuservariable and long lines
  2025-03-12 13:23 [NTG-context] Structureuservariable and long lines denis.maier
@ 2025-03-12 15:16 ` Denis Maier via ntg-context
  2025-03-12 15:20 ` Wolfgang Schuster
  1 sibling, 0 replies; 5+ messages in thread
From: Denis Maier via ntg-context @ 2025-03-12 15:16 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'; +Cc: denismaier


[-- Attachment #1.1: Type: text/plain, Size: 1442 bytes --]

Turns out this is not really related to structureuservariables… happens here
too:

 

\define[2]\sectionCMD

    {#1 #2}

 

\setuphead [section]

        [

        command=\sectionCMD,

        ]

 

\starttext

\startsection

  [title=asdfasdf jasklödf aöslkdfj aölskdjf öaslkdjf öalskdjf öalksdjf
öalskdjf ölaskdjf öalskdjf öalskdjf öasldkjföalsdjkföasdljf öasdlf öasdl
fjöasdf]

asdf

\stopsection

\stoptext

 

 

 

Von: denis.maier@unibe.ch <denis.maier@unibe.ch> 
Gesendet: Mittwoch, 12. März 2025 14:24
An: ntg-context@ntg.nl
Betreff: [NTG-context] Structureuservariable and long lines

 

Hi,

 

I have section headings where I need to output some descriptions after the
label and before the heading title (which may be missing in some cases).
I’ve thought the something like the example below should work, but the text
from the variable overflows. 

What am I missing here? 

Is there maybe an easier way to reach that goal?

 

Best,

Denis

 

\define[2]\sectionCMD

    {#1\par

    \structureuservariable{something}\par

    #2

}

 

\setuphead [section]

        [

        command=\sectionCMD,

        ]

 

\starttext

\startsection

  [title=Hello]

  [something=ajskdflö asjdfkl asjdföla asdf asdf asdf asdf asdf ksdföalks
djföalskd föalskdföl asdjkfaöls djkfaölsdjf,]

 

asdf

\stopsection

\stoptext

 


[-- Attachment #1.2: Type: text/html, Size: 5998 bytes --]

[-- Attachment #2: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
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] 5+ messages in thread

* [NTG-context] Re: Structureuservariable and long lines
  2025-03-12 13:23 [NTG-context] Structureuservariable and long lines denis.maier
  2025-03-12 15:16 ` [NTG-context] " Denis Maier via ntg-context
@ 2025-03-12 15:20 ` Wolfgang Schuster
  2025-03-12 15:40   ` Denis Maier via ntg-context
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2025-03-12 15:20 UTC (permalink / raw)
  To: ntg-context

Am 12.03.2025 um 14:23 schrieb denis.maier@unibe.ch:
> Hi,
> 
> I have section headings where I need to output some descriptions after 
> the label and before the heading title (which may be missing in some 
> cases). I’ve thought the something like the example below should work, 
> but the text from the variable overflows.
> 
> What am I missing here?
> 
> Is there maybe an easier way to reach that goal?
> 
> Best,
> 
> Denis
> 
> \define[2]\sectionCMD
> {#1\par
>      \structureuservariable{something}\par
> #2
> }

\define[2]\sectionCMD
   {\vbox\bgroup
    #1\par
    \structureuservariable{something}\par
    #2
    \egroup}

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] 5+ messages in thread

* [NTG-context] Re: Structureuservariable and long lines
  2025-03-12 15:20 ` Wolfgang Schuster
@ 2025-03-12 15:40   ` Denis Maier via ntg-context
  2025-03-12 15:53     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Denis Maier via ntg-context @ 2025-03-12 15:40 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'; +Cc: denismaier

> -----Ursprüngliche Nachricht-----
> Von: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
> Gesendet: Mittwoch, 12. März 2025 16:20
> An: ntg-context@ntg.nl
> Betreff: [NTG-context] Re: Structureuservariable and long lines
> 
> Am 12.03.2025 um 14:23 schrieb denis.maier@unibe.ch:
> > Hi,
> >
> > I have section headings where I need to output some descriptions after
> > the label and before the heading title (which may be missing in some
> > cases). I’ve thought the something like the example below should work,
> > but the text from the variable overflows.
> >
> > What am I missing here?
> >
> > Is there maybe an easier way to reach that goal?
> >
> > Best,
> >
> > Denis
> >
> > \define[2]\sectionCMD
> > {#1\par
> >      \structureuservariable{something}\par
> > #2
> > }
> 
> \define[2]\sectionCMD
>    {\vbox\bgroup
>     #1\par
>     \structureuservariable{something}\par
>     #2
>     \egroup}
> 

Thanks that works.
How can I now format the individual parts? This applies the \bf-formatting even to #1 and to the variable which is not wanted.

\define[2]\inksubsectionCMD
   {\vbox\bgroup
    #1\endgraf
    \structureuservariable{description}\endgraf
	{\bf #2}\egroup
	}




___________________________________________________________________________________
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] 5+ messages in thread

* [NTG-context] Re: Structureuservariable and long lines
  2025-03-12 15:40   ` Denis Maier via ntg-context
@ 2025-03-12 15:53     ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2025-03-12 15:53 UTC (permalink / raw)
  To: ntg-context

Am 12.03.2025 um 16:40 schrieb Denis Maier via ntg-context:
>> -----Ursprüngliche Nachricht-----
>> Von: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
>> Gesendet: Mittwoch, 12. März 2025 16:20
>> An: ntg-context@ntg.nl
>> Betreff: [NTG-context] Re: Structureuservariable and long lines
>>
>> Am 12.03.2025 um 14:23 schrieb denis.maier@unibe.ch:
>>> Hi,
>>>
>>> I have section headings where I need to output some descriptions after
>>> the label and before the heading title (which may be missing in some
>>> cases). I’ve thought the something like the example below should work,
>>> but the text from the variable overflows.
>>>
>>> What am I missing here?
>>>
>>> Is there maybe an easier way to reach that goal?
>>>
>>> Best,
>>>
>>> Denis
>>>
>>> \define[2]\sectionCMD
>>> {#1\par
>>>       \structureuservariable{something}\par
>>> #2
>>> }
>>
>> \define[2]\sectionCMD
>>     {\vbox\bgroup
>>      #1\par
>>      \structureuservariable{something}\par
>>      #2
>>      \egroup}
>>
> 
> Thanks that works.
> How can I now format the individual parts? This applies the \bf-formatting even to #1 and to the variable which is not wanted.
> 
> \define[2]\inksubsectionCMD
>     {\vbox\bgroup
>      #1\endgraf
>      \structureuservariable{description}\endgraf
> 	{\bf #2}\egroup
> 	}


Disable the default style for \subsection etc.

\setuphead[subsection][style=]

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] 5+ messages in thread

end of thread, other threads:[~2025-03-12 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-12 13:23 [NTG-context] Structureuservariable and long lines denis.maier
2025-03-12 15:16 ` [NTG-context] " Denis Maier via ntg-context
2025-03-12 15:20 ` Wolfgang Schuster
2025-03-12 15:40   ` Denis Maier via ntg-context
2025-03-12 15:53     ` 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).