Dear list

I have a document with section headings which include a title, date and
reference spread over two lines with different font style and
justification, plus a slightly different text for the table of contents.


So that I can alter the styling of the section headings without having to
recode each \startsection command, I have used variables and a macro
command for the style.


This works for section 'title' and 'marking', but not for the 'list'
attribute.


The minimal working example below shows what I'm trying to do.


Best wishes and many thanks in advance.


James



\define\mytitle{\getvariable{myvar}{title}\crlf{\tfx\getvariable{myvar}{date}\hfill\getvariable{myvar}{ref}}}
\define\mylist{\getvariable{myvar}{list}---{\bf \getvariable{myvar}{date}}}

\starttext

\completecontent

\setvariables[myvar][
title={What I would like},
date={2020},
ref={Reference No 1},
list={Variation on title},
]

\startsection[title=\mytitle,list={Variation on title---{\bf 2020}}]

Contents line to look like this:

\mylist

\stopsection


\setvariables[myvar][
title={What I get},
date={2021},
ref={Reference No 2},
list={Something for the contents},
]

\startsection[title=\mytitle,list=\mylist]

Contents line to look like this:

\mylist

\stopsection
\stoptext

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to