ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Calum MacLeod <pabbay@gmail.com>
To: ntg-context@ntg.nl
Subject: Formatting in the toc
Date: Sat, 9 Nov 2019 21:03:41 +0000	[thread overview]
Message-ID: <CAKM7QBnJZU8mp7=s8795cOOcDc5V61p4519dBgUSWDGGa7_uGQ@mail.gmail.com> (raw)


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

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?

[-- Attachment #1.2: Type: text/html, Size: 2239 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
___________________________________________________________________________________

             reply	other threads:[~2019-11-09 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-09 21:03 Calum MacLeod [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-04 21:07 Calum MacLeod
2019-11-04 21:17 ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKM7QBnJZU8mp7=s8795cOOcDc5V61p4519dBgUSWDGGa7_uGQ@mail.gmail.com' \
    --to=pabbay@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=pangur@sky.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).