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
Am 06.12.2013 um 13:53 schrieb H. van der Meer
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
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
Am 06.12.2013 um 13:53 schrieb H. van der Meer
: 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 ___________________________________________________________________________________
Am 06.12.2013 um 14:59 schrieb H. van der Meer
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
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
Am 06.12.2013 um 14:59 schrieb H. van der Meer
: 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 ___________________________________________________________________________________
Am 06.12.2013 um 17:32 schrieb H. van der Meer
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
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
Am 06.12.2013 um 17:32 schrieb H. van der Meer
: 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 ___________________________________________________________________________________
Am 06.12.2013 um 20:20 schrieb H. van der Meer
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
\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
Am 06.12.2013 um 20:20 schrieb H. van der Meer
: 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
Am 06.12.2013 um 21:04 schrieb H. van der Meer
\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
participants (2)
-
H. van der Meer
-
Wolfgang Schuster