[NTG-context] Formatting in the toc

Calum MacLeod pabbay at gmail.com
Sat Nov 9 22:03:41 CET 2019


I have now found time to see if I could work out how to apply
\structurelistuservariable. In short, I  have to admit that I could not.

I am grateful to Hraban for his encouraging response, but though I could
see it was related, it seems to me not quite what I seek.

The more I thought about the answer, I realised I had not explained my
question in a precise manner.

I am retired, and produce a weekly A5 booklet from material with which my
wife (a church minister), supplies to me. I call it a pulpit manuscript. It
is the entire script for her service. Included are the numbers and first
line of five hymns, that are different each week.

Until I gain a better understanding of ConTeXt, I shall continue to use
LaTeX koma-script package for the weekly booklet. In order to make life
easier for myself, I have created commands of my own.

One of these commands enables me to have a template which has five
instances of \hymn{} {}. If I put with the first braces pair '387', and in
the second pair, 'The Lord's my shepherd' --- when LaTeX koma-script
outputs the PDF, 'Hymn 387' is in bold and 'The Lord's my shepherd' is
italicised. For the next hymn, it would be a different number, and
different first line, but it would auto-formatted the way I want.

That command is constructed in the preamble in the following way:

\newcommand{\hymn}[3][Hymn]{\addsec{\rlap{\textbf{#1
#2}}\hspace}{7em}{\normalfont\small\textit{#3} }}}

This places a specific gap between the hymn number and the first line as
well. Not only does it format the section heading (\addsec) to have bold
and italics (without bold), it formats the corresponding entry in the toc
in exactly the same way.

How can I make a similar command for ConTeXt, please?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20191109/079f862a/attachment.html>


More information about the ntg-context mailing list