Re: [NTG-context] ToC - right-alignment of roman numerals
![](https://secure.gravatar.com/avatar/d39338246f50cca667c8256c313d7cfd.jpg?s=120&d=mm&r=g)
On 2013–06–03 honyk 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.
\setuphead[chapter][conversion=Romannumerals] \setupheadnumber[chapter][48] \setupcombinedlist [content] [alternative=c] \setupcombinedlist [chapter] [distance=1em, width=1cm, numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}] \starttext \completecontent \chapter{Foo} \chapter{Bar} \stoptext
In addition, the specified width and distance seem to be somehow ignored so that label interferes with the title.
The width setting needs to be applied to the chapter list, not the content list, see example above. Marco
![](https://secure.gravatar.com/avatar/b725c6396317bce49729e7787da89aef.jpg?s=120&d=mm&r=g)
This is great! Thanks
On 2013–06–03 honyk 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.
\setuphead[chapter][conversion=Romannumerals] \setupheadnumber[chapter][48]
\setupcombinedlist [content] [alternative=c]
\setupcombinedlist [chapter] [distance=1em, width=1cm,
numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}]
\starttext \completecontent \chapter{Foo} \chapter{Bar} \stoptext
In addition, the specified width and distance seem to be somehow ignored so that label interferes with the title.
The width setting needs to be applied to the chapter list, not the content list, see example above.
Marco
![](https://secure.gravatar.com/avatar/b725c6396317bce49729e7787da89aef.jpg?s=120&d=mm&r=g)
On 2013-06-03 Marco Patzer wrote:
On 2013–06–03 honyk 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.
The width setting needs to be applied to the chapter list, not the content list, see example
\setuphead[chapter][conversion=Romannumerals] \setupheadnumber[chapter][48]
\setupcombinedlist [content] [alternative=c]
\setupcombinedlist [chapter] [distance=1em, width=1cm, numbercommand={\simplealignedbox{\listparameter{width}}{flushright}} ]
\starttext \completecontent \chapter{Foo} \chapter{Bar} \stoptext
Whereas this works for basic test cases, in my document it ends with an error: structure > sectioning > title @ level 2 : 0.0 -> \headtext {content} ! Argument of \147>flushright has an extra }. How can I decode this message and fix the problematic location? Thanks, Jan
participants (3)
-
honyk
-
Jan Tosovsky
-
Marco Patzer