ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* wider item numbering in toc
@ 2013-12-06 12:53 H. van der Meer
  2013-12-06 13:44 ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: H. van der Meer @ 2013-12-06 12:53 UTC (permalink / raw)
  To: NTG ConTeXt

In the table of contents my items are numbers 1, 2, etc. At the number the aligning is wrong, the tens are shifted to the right. I tried to remedy with a setup:
\setupitemgroup[itemize][each][5,autointro][…]
But changing width, distance, textdistance, itemalign do not have effect on the toc.
How to accomplish?

Hans van der Meer



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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  2013-12-06 12:53 wider item numbering in toc H. van der Meer
@ 2013-12-06 13:44 ` Wolfgang Schuster
  2013-12-06 13:59   ` H. van der Meer
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2013-12-06 13:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.12.2013 um 13:53 schrieb H. van der Meer <H.vanderMeer@uva.nl>:

> In the table of contents my items are numbers 1, 2, etc. At the number the aligning is wrong, the tens are shifted to the right. I tried to remedy with a setup:
> \setupitemgroup[itemize][each][5,autointro][…]
> But changing width, distance, textdistance, itemalign do not have effect on the toc.
> How to accomplish?

Where is the problem, in your table of contents which is controlled by \setuplist or in your itemize which is controlled by \setupitemgroup?

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  2013-12-06 13:44 ` Wolfgang Schuster
@ 2013-12-06 13:59   ` H. van der Meer
  2013-12-06 14:13     ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: H. van der Meer @ 2013-12-06 13:59 UTC (permalink / raw)
  To: NTG ConTeXt

The table of contents results from:

\startfrontmatter
	\input front
		\let\ChapterTOC\relax	% Only then chapters typeset !?
		\completecontent
\stopfrontmatter

The table of contents is typeset from the completecontent, so I guess the answer to your question will be \setuplist.

There I have set

\setupcombinedlist[content][list=chapter]%	[list={chapter,section}]
\setupcombinedlist[section][list=section]

Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main toc giving the chapters, whereas in the seperate chapters the sections therin should appear in their own toc.

Hans van der Meer



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

> 
> Am 06.12.2013 um 13:53 schrieb H. van der Meer <H.vanderMeer@uva.nl>:
> 
>> In the table of contents my items are numbers 1, 2, etc. At the number the aligning is wrong, the tens are shifted to the right. I tried to remedy with a setup:
>> \setupitemgroup[itemize][each][5,autointro][…]
>> But changing width, distance, textdistance, itemalign do not have effect on the toc.
>> How to accomplish?
> 
> Where is the problem, in your table of contents which is controlled by \setuplist or in your itemize which is controlled by \setupitemgroup?
> 
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2013-12-06 14:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.12.2013 um 14:59 schrieb H. van der Meer <H.vanderMeer@uva.nl>:

> The table of contents results from:
> 
> \startfrontmatter
> 	\input front
> 		\let\ChapterTOC\relax	% Only then chapters typeset !?
> 		\completecontent
> \stopfrontmatter
> 
> The table of contents is typeset from the completecontent, so I guess the answer to your question will be \setuplist.
> 
> There I have set
> 
> \setupcombinedlist[content][list=chapter]%	[list={chapter,section}]
> \setupcombinedlist[section][list=section]
> 
> Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main toc giving the chapters, whereas in the seperate chapters the sections therin should appear in their own toc.


Which numbers are wrong, the section numbers or the page numbers?

\starttext

\title{Table of contents}

\placecontent[list=chapter]

\dorecurse{20}
  {\chapter{Chapter #1}
   \placecontent % lists are local unless you use criterium=all
   \dorecurse{5}
     {\section{Section #1.##1}}}

\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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  2013-12-06 14:13     ` Wolfgang Schuster
@ 2013-12-06 16:32       ` H. van der Meer
  2013-12-06 16:41         ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: H. van der Meer @ 2013-12-06 16:32 UTC (permalink / raw)
  To: NTG ConTeXt


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


> Which numbers are wrong, the section numbers or the page numbers?

The chapter numbers. See the jpg below. The 10 with its separator  is too far to the right.

Hans van der Meer



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

> 
> Am 06.12.2013 um 14:59 schrieb H. van der Meer <H.vanderMeer@uva.nl>:
> 
>> The table of contents results from:
>> 
>> \startfrontmatter
>> 	\input front
>> 		\let\ChapterTOC\relax	% Only then chapters typeset !?
>> 		\completecontent
>> \stopfrontmatter
>> 
>> The table of contents is typeset from the completecontent, so I guess the answer to your question will be \setuplist.
>> 
>> There I have set
>> 
>> \setupcombinedlist[content][list=chapter]%	[list={chapter,section}]
>> \setupcombinedlist[section][list=section]
>> 
>> Why I have to use \let\ChapterTOC\relax is a riddle to me. I want the main toc giving the chapters, whereas in the seperate chapters the sections therin should appear in their own toc.
> 
> 
> Which numbers are wrong, the section numbers or the page numbers?
> 
> \starttext
> 
> \title{Table of contents}
> 
> \placecontent[list=chapter]
> 
> \dorecurse{20}
>  {\chapter{Chapter #1}
>   \placecontent % lists are local unless you use criterium=all
>   \dorecurse{5}
>     {\section{Section #1.##1}}}
> 
> \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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #1.2.1: Type: text/html, Size: 3391 bytes --]

[-- Attachment #1.2.2: capture.jpg --]
[-- Type: image/jpg, Size: 13216 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2013-12-06 16:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 06.12.2013 um 17:32 schrieb H. van der Meer <H.vanderMeer@uva.nl>:

> 
>> Which numbers are wrong, the section numbers or the page numbers?
> 
> The chapter numbers. See the jpg below. The 10 with its separator  is too far to the right.

This is normal because the numbers are aligned on the left margin, when the space for the number
is too narrow you have to increase the width value, e.g. \setuplist[chapter][width=3em].

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  2013-12-06 16:41         ` Wolfgang Schuster
@ 2013-12-06 19:20           ` H. van der Meer
  2013-12-06 19:36             ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: H. van der Meer @ 2013-12-06 19:20 UTC (permalink / raw)
  To: NTG ConTeXt

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.

I tried something like \setupitemgroup[chapter][][][itemalign=left (also tried right)] but to no avail.

 Hans van der Meer



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

> 
> Am 06.12.2013 um 17:32 schrieb H. van der Meer <H.vanderMeer@uva.nl>:
> 
>> 
>>> Which numbers are wrong, the section numbers or the page numbers?
>> 
>> The chapter numbers. See the jpg below. The 10 with its separator  is too far to the right.
> 
> This is normal because the numbers are aligned on the left margin, when the space for the number
> is too narrow you have to increase the width value, e.g. \setuplist[chapter][width=3em].
> 
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Schuster @ 2013-12-06 19:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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.

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

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  2013-12-06 19:36             ` Wolfgang Schuster
@ 2013-12-06 20:04               ` H. van der Meer
  2013-12-07 11:11                 ` Wolfgang Schuster
  0 siblings, 1 reply; 10+ messages in thread
From: H. van der Meer @ 2013-12-06 20:04 UTC (permalink / raw)
  To: NTG ConTeXt


[-- 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: wider item numbering in toc
  2013-12-06 20:04               ` H. van der Meer
@ 2013-12-07 11:11                 ` Wolfgang Schuster
  0 siblings, 0 replies; 10+ messages in thread
From: Wolfgang Schuster @ 2013-12-07 11:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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


Am 06.12.2013 um 21:04 schrieb H. van der Meer <H.vanderMeer@uva.nl>:

>> \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.

When there would a key for this it should be named numberalign.

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

You specify the number of argument for the \define command with the number, e.g.

    \define\command{…} is equal to \unexpanded\def\command{…}

and

    \define[3]\command{…} is equal to \unexpanded\def#1#2#3{…}


When you want to create a command which is similar to \def (without \unexpanded) you can use \defineexpandable[<number>]\command

>> 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?).

No, they are unrelated but both mechanism use the same low level commands for the indentation of the text.

Wolfgang

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-12-07 11:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-06 12:53 wider item numbering in toc 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
2013-12-07 11:11                 ` Wolfgang Schuster

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).