ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: jbf <roma83537@gmail.com>
To: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Cc: "ntg >> mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: styling individual parts of ToC entry
Date: Wed, 9 Sep 2020 19:39:11 +1000	[thread overview]
Message-ID: <86c233cd-3b30-7b37-68ac-fd9cbf60459f@gmail.com> (raw)
In-Reply-To: <e758c4c8-534f-8492-6cb3-c19736d9e20e@gmail.com>

Thanks. Just two clarifications (also noting that I altered 'forword' in 
yours to 'foreword' in mine in every instance, just to get the spelling 
right):

1. Compiling your example just as it is below produces a result like:

[foreword: – – 2]Chapter 1 Chapter 1
                                            A. u. thor                  3

We obviously should not be getting [foreword: --2] in our result, nor a 
doubling up of Chapter 1

2. Where do I stand now with the earlier definition  (I mean the 
\define[3]\ChapterListCommand. Is that still used? Including its 
\setuplist part? What you have just given me now makes no reference to 
\ChapterListCommand, so perhaps it is no longer relevant?

Julian





On 9/9/20 5:10 pm, Wolfgang Schuster wrote:
> jbf schrieb am 09.09.2020 um 08:04:
>> Have to confess I am still not getting far with the final problem in 
>> a book that is now fully laid out: frontmatter through to appendices 
>> is all correct and working, but the Table of Contents not the way I 
>> need it (as explained earlier and listed in a previous email).
>>
>> My latest effort focuses on just one item, the Foreword, since if I 
>> get that right, I can apply the same logic to sections. Chapters are 
>> already working correctly, thanks to Wolfgang's ChapterListCommand 
>> and I am assuming I need that for the several frontmatter 'chapters'.
>>
>> I was earlier using \title for foreword, preface and notes to 
>> contributors, but have abandoned that as complicating things, and am 
>> now using \chapter, since it does not produce a numbered item - 
>> however, it is producing the label 'Chapter' which I don't want for 
>> these item. You can see below how I tried to avoid that, but it 
>> failed. My MWE addition to what Wolfgang provided is:
>>
>> \definehead [foreword] [chapter]
>>
>> \setuphead [foreword]
>>
>> \setuplist [foreword]
>>   [label=foreword,
>>   alternative=command,
>>   command=\ChapterListCommand]% definition not included here. It was 
>> given in an earlier response from Wolfgang.
>>
>> .... And in the frontmatter itself:
>>
>> \startchapter[foreword][title={\ss Foreword}][author={A. Uthor}]
>>
>> ..........
>
> You can set the forword string as labeltext and ignore the title (but 
> use a empty argument when set userdata like the author).
>
> \definehead
>   [forword] [chapter]
>
> \setuplabeltext
>   [en]
>   [forword=Forword,
>    chapter=Chapter ]
>
> \setuphead
>   [forword]
>   [frontpartlabel=forword,
>    conversion=empty]
>
> \setupsectionblock
>   [frontpart]
>   [number=yes]
>
> \setuplist
>   [forword]
>   [label=forword,
>    width=2cm]
>
> \setuplist
>   [chapter]
>   [label=chapter,
>    width=2cm]
>
> \starttext
>
> \startfrontmatter
>
> \placelist [chapter,forword]
>
> \startforword [] [author={A. u. thor}] \stopforword
>
> \stopfrontmatter
>
> \startbodymatter
>
> \startchapter [title=Chapter 1] [author={A. u. thor}] \stopchapter
>
> \stopbodymatter
>
> \stoptext
>
> Wolfgang
___________________________________________________________________________________
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:[~2020-09-09  9:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05  1:35 jbf
2020-09-05  8:30 ` Henning Hraban Ramm
2020-09-05  9:16 ` Wolfgang Schuster
2020-09-06  0:03   ` jbf
2020-09-06  7:36     ` Wolfgang Schuster
2020-09-06 23:31       ` jbf
2020-09-07  6:57         ` Wolfgang Schuster
2020-09-09  6:04           ` jbf
2020-09-09  7:10             ` Wolfgang Schuster
2020-09-09  9:39               ` jbf [this message]

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=86c233cd-3b30-7b37-68ac-fd9cbf60459f@gmail.com \
    --to=roma83537@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.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).