Re: [NTG-context] ToC - right-alignment of roman numerals
On 11/24/2013 10:49 PM, Jan Tosovsky wrote:
On 2013-11-18 Jan Tosovsky wrote:
On 2013–06–03 Jan Tosovsky wrote: in fresh MkIV I use the following commands for building ToC, but I have no idea how to align the label (roman numeral) to the right.
I am almost there, but things get complicated when chapters are combined with preface/index titles without numbering and thus aligned improperly:
\setupcombinedlist[content][list=chapter, alternative=c] \setupcombinedlist[chapter][ distance=1em, width=1cm,
numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}, ]
\starttext \completecontent
\startfrontmatter \chapter{Preface}text \stopfrontmatter
\startbodymatter \chapter{Chapter}text\index{primary} \stopbodymatter
\startbackmatter \completeindex \stopbackmatter
\stoptext
Is there any way how to indent these non-numbered titles so that they start where the chapter title starts?
I've fixed it by applying a margin to everything and setting a negative width to the numbers (distance = -width):
\setupcombinedlist[chapter][ distance=0.5cm, width=-0.5cm, margin=2cm, numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}, ]
I don't know exactly why it works, but it works :-)
\setupcombinedlist [content] [list=chapter, alternative=c] \setuplist [chapter] [aligntitle=yes, distance=1em, width=1cm] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 2013-11-25 Hans Hagen wrote:
On 11/24/2013 10:49 PM, Jan Tosovsky wrote:
On 2013-11-18 Jan Tosovsky wrote:
On 2013–06–03 Jan Tosovsky wrote:
in fresh MkIV I use the following commands for building ToC, but I have no idea how to align the label (roman numeral) to the right.
I am almost there, but things get complicated when chapters are combined with preface/index titles without numbering and thus aligned improperly:
\setupcombinedlist[content][list=chapter, alternative=c] \setupcombinedlist[chapter][ distance=1em, width=1cm,
numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]
\starttext \completecontent
\startfrontmatter \chapter{Preface}text \stopfrontmatter
\startbodymatter \chapter{Chapter}text\index{primary} \stopbodymatter
\startbackmatter \completeindex \stopbackmatter
\stoptext
Is there any way how to indent these non-numbered titles so that they start where the chapter title starts?
I've fixed it by applying a margin to everything and setting a negative width to the numbers (distance = -width):
\setupcombinedlist[chapter][ distance=0.5cm, width=-0.5cm, margin=2cm,
numbercommand={\simplealignedbox{\listparameter{width}}{flushright}},
]
I don't know exactly why it works, but it works :-)
\setupcombinedlist [content] [list=chapter, alternative=c]
\setuplist [chapter] [aligntitle=yes, distance=1em, width=1cm]
Thanks for this alternative, but I am getting something different. Desired output can be produced with this code: \setuphead[chapter][conversion=Romannumerals] %\setupheadnumber[chapter][48] % this is ignored when a preface is defined \setupcombinedlist[content][alternative=c] \setupcombinedlist[chapter][ distance=1em, width=-1em, margin=15mm, numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}, ] \starttext \completecontent \startfrontmatter \chapter{Preface} \stopfrontmatter \startbodymatter \chapter{Chapter1} \chapter{Chapter2} \chapter{Chapter3} \chapter{Chapter4} \stopbodymatter \stoptext If there is a less cumbersome method, thanks for sharing. Jan
participants (2)
-
Hans Hagen
-
Jan Tosovsky