[NTG-context] Formatting in the toc

2019-11-09 Thread Calum MacLeod
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?
___
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
___


Re: [NTG-context] Formatting in the toc

2019-11-04 Thread Henning Hraban Ramm
I’d suggest to use something like (untested)

\startsubject[title={The Lord’s my Shepherd}][biblepart={Hymn 387}]

and

\setuphead[subject][command=\MyBibleSection]

\define[2]\MyBibleSection{{\bf #1}\hfill{\it\structureuservariable{biblepart}}}

You’d need to setup your ToC useing \structurelistuservariable,
similar to https://wiki.contextgarden.net/Generate_Authorlist_from_Head_Content


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD


> Am 2019-11-04 um 22:07 schrieb Calum MacLeod :
> 
> In the body of document, I often have a heading such as this:
> 
> \subject{{\bf Hymn 387} \hfill {\it The Lord's my Shepherd}}
> 
> When it arrives in the Table of Contents, the bold and italic have been 
> stripped off.
> 
> My question is: How do I copy to ToC the formatting as well as the content of 
> the text?
> 
> I would be grateful for an answer, or to be pointed to where I could learn 
> more. 
> 
> Thanks in advance,
> Calum MacLeod
> ___
> 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
> ___


___
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
___


[NTG-context] Formatting in the toc

2019-11-04 Thread Calum MacLeod
In the body of document, I often have a heading such as this:

\subject{{\bf Hymn 387} \hfill {\it The Lord's my Shepherd}}

When it arrives in the Table of Contents, the bold and italic have been
stripped off.

My question is: How do I copy to ToC the formatting as well as the content
of the text?

I would be grateful for an answer, or to be pointed to where I could learn
more.

Thanks in advance,
Calum MacLeod
___
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
___