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
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
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
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
participants (2)
-
Sylvain Hubert
-
Wolfgang Schuster