jbf schrieb am 06.09.2020 um 02:03:
Thanks Wolfgang, while I don't pretend to fully understand the setup you have provided (but am working on doing so!), of course it provides the correct result for a chapter that has a title, an author, and a year.

My ever-so-complicated book (and its authors!) however, throws one small further complication into the mix.

Where a chapter does not have a year-range, and I either omit that declaration, or I leave the curly brackets empty (e.g. year={}), then I find that the author name also does not appear in the ToC. What adjustment to the \ChapterListCommand do I need to make to accommodate the following? Possibly an \else statement, but not sure how to include that:

\startchapter [title={Chapter title}] [author={Author Name}]

I forgot to change the argument for the check off the author entry, this should fix it.

\define[3]\ChapterListCommand
  {\hbox\bgroup
     \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext
     \vtop\bgroup
       \hsize\dimexpr\makeupwidth-3cm\relax
       \doifsomething{\rawstructurelistuservariable{year}}
         {{\it\structurelistuservariable{year}}\crlf}%
       \currentlistentrytitle % title
       \doifsomething{\rawstructurelistuservariable{author}}
         {\crlf{\bf\structurelistuservariable{author}}}%
       \hfill\currentlistentrypagenumber % pagenumber
     \egroup
   \egroup}

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to