[NTG-context] Centered list of authors in ToC

mf massifr at fastwebnet.it
Tue Feb 9 11:02:46 CET 2021

Il 09/02/21 10:49, jbf ha scritto:
> I wonder if someone can assist me with the final step in a complicated 
> Table of Contents where all items in the ToC are centred (except page 
> numbers which continue to be on the right).
> Beneath each chapter title is a list of authors (Yes, there can be up to 
> four authors per chapter!)
> I can successfully achieve everything (see MWE below) except for getting 
> the list of authors to split and be centred. Because there are four of 
> them, I would need to split them so they appear as two (centred) with 
> the other two below(also centred).
> Here is my MWE for the essential bit (which is then called in as 
> textcommand=\SectionTocEntry in \setuplist[chapter], obviously):
> \define[1]\SectionTocEntry{%
> #1\crlf% title
> \midaligned{\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}}% 
> }

try \startalignment[middle] ... \stopalignment instead of \midaligned

> My problem is that at the moment, the four authors appear on a single 
> line, so I end up with:
>             My chapter title
> Mickey Mouse, Donald Duck, Uncle Scrooge, Minnie Mouse  [p. 1, but in 
> fact, Minnie Mouse runs across the page number!]
> What I want instead is:
>            My chapter title
>      Mickey Mouse, Donald Duck
>     Uncle Scrooge, Minnie Mouse        [p. number]
> Back at the chapter level my code reads:
> \startchapter[title={Chapter title}][author={Mickey Mouse, Donald Duck, 
> Uncle Scrooge, Minnie Mouse}].

\startchapter[title={Chapter title}][author={Mickey Mouse, Donald 
Duck,\crlf Uncle Scrooge, Minnie Mouse}].


More information about the ntg-context mailing list