ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "H. van der Meer" <H.vanderMeer@uva.nl>
To: NTG ConTeXt <ntg-context@ntg.nl>
Subject: Re: wider item numbering in toc
Date: Fri, 6 Dec 2013 21:04:59 +0100	[thread overview]
Message-ID: <E9ABED5B-ABE4-428B-98A4-6F6BCC026BD5@uva.nl> (raw)
In-Reply-To: <6C55D7EA-AA82-4D9D-9F6B-A5325577D63E@gmail.com>


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

> \define[1]\ChapterListNumber
>  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> 
> \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]

This now gives a toc looking the way I like.
May I lay at your foot a plea for a change/additional parameter here? \setuplist[][itemalign=left/right] or something in that sense.
For numbered chapters I consider an alignment as below most natural, although opinions may differ.
 8
 9
10
11
instead of
8
9
10
11

By the way, the \define[1] eludes me. Why this particular [1] there?

> Why do you think lists use the itemgroup/itemize mechanism?

I didn’t think that exactly, but just tried it in despair and having the idea that toc items are set as an itemized list (it looks that way, isn’t it?).

Hans van der Meer



On 6 dec. 2013, at 20:36, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:

> 
> Am 06.12.2013 um 20:20 schrieb H. van der Meer <H.vanderMeer@uva.nl>:
> 
>> Indeed, \setuplist[chapter][width=3em] makes the chapternumber set in a wider field.
>> 
>> But the alignment is as bad as it was: flushleft, i.e. the 1 of chapter 10 still aligns with the units from the lower chapters instead of aligning to the zero.
>> 
>> I looked up \setuplist in the command catalogue but cannot find a parameter to align this number, either to the right or to the left. It just seems to stick with the builtin default.
> 
> \define[1]\ChapterListNumber
>  {\simplealignedbox{\listparameter{width}}{flushright}{#1}}
> 
> \setuplist[chapter][width=2em,distance=1em,numbercommand=\ChapterListNumber]
> 
> \starttext
> 
> \title{Table of contents}
> 
> \placecontent
> 
> \dorecurse{20}{\chapter{Chapter #1}}
> 
> \stoptext
> 
>> I tried something like \setupitemgroup[chapter][][][itemalign=left (also tried right)] but to no avail.
> Wolfgang
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 3029 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2013-12-06 20:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 12:53 H. van der Meer
2013-12-06 13:44 ` Wolfgang Schuster
2013-12-06 13:59   ` H. van der Meer
2013-12-06 14:13     ` Wolfgang Schuster
2013-12-06 16:32       ` H. van der Meer
2013-12-06 16:41         ` Wolfgang Schuster
2013-12-06 19:20           ` H. van der Meer
2013-12-06 19:36             ` Wolfgang Schuster
2013-12-06 20:04               ` H. van der Meer [this message]
2013-12-07 11:11                 ` Wolfgang Schuster

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=E9ABED5B-ABE4-428B-98A4-6F6BCC026BD5@uva.nl \
    --to=h.vandermeer@uva.nl \
    --cc=ntg-context@ntg.nl \
    /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).