ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \section with userdata
@ 2020-11-07 21:33 Sylvain Hubert
  2020-11-07 21:42 ` Sylvain Hubert
  0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Hubert @ 2020-11-07 21:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear List,

it is known that we can supply additional userdata like authors to
\startsection:

    \startsection[title=Title][author=Someone]

so that the author can be included in the table of contents using
\structurelistuservariable{author}.

Now I would like to do the same with \section, but according to the wiki
<https://wiki.contextgarden.net/Command/_section>, \section doesn't seem to
accept any additional parameters like \startsection does.

Does anyone know whether there is a workaround to let \section accept
userdata parameters?

Thanks!

Best,
Sylvain

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \section with userdata
  2020-11-07 21:33 \section with userdata Sylvain Hubert
@ 2020-11-07 21:42 ` Sylvain Hubert
  2020-11-07 22:47   ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Hubert @ 2020-11-07 21:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

The motivation of using \section was to avoid \stopsection, but I just
found out that \stopsection is not really necessary.

Now I would like to ask whether there is any difference between
\section{Title} and \startsection[title=Title].

Thanks.

On Sat, 7 Nov 2020 at 22:33, Sylvain Hubert <champignoom@gmail.com> wrote:

> Dear List,
>
> it is known that we can supply additional userdata like authors to
> \startsection:
>
>     \startsection[title=Title][author=Someone]
>
> so that the author can be included in the table of contents using
> \structurelistuservariable{author}.
>
> Now I would like to do the same with \section, but according to the wiki
> <https://wiki.contextgarden.net/Command/_section>, \section doesn't seem
> to accept any additional parameters like \startsection does.
>
> Does anyone know whether there is a workaround to let \section accept
> userdata parameters?
>
> Thanks!
>
> Best,
> Sylvain
>

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \section with userdata
  2020-11-07 21:42 ` Sylvain Hubert
@ 2020-11-07 22:47   ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2020-11-07 22:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Sylvain Hubert schrieb am 07.11.2020 um 22:42:
> The motivation of using \section was to avoid \stopsection, but I just 
> found out that \stopsection is not really necessary.
> 
> Now I would like to ask whether there is any difference between 
> \section{Title} and \startsection[title=Title].

You get extra hooks with \startsection.

\startsetups [beforesection]
     \framed[width=max,foregroundstyle=\tttf]{begin of section}
\stopsetups

\startsetups [insidesection]
     \framed[width=max,foregroundstyle=\tttf]{middle of section}
\stopsetups

\startsetups [aftersection]
     \framed[width=max,foregroundstyle=\tttf]{end of section}
\stopsetups

\setuphead
   [section]
   [beforesection=\directsetup{beforesection},
    insidesection=\directsetup{insidesection},
     aftersection=\directsetup{aftersection}]

\starttext

\startsection[title=\tex{startsection}]
\samplefile{ward}\par
\stopsection

\page

\section{\tex{section}}
\samplefile{ward}

\stoptext

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-07 22:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07 21:33 \section with userdata Sylvain Hubert
2020-11-07 21:42 ` Sylvain Hubert
2020-11-07 22:47   ` 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).