Hi again,
Alan Bowen invented this interesting setup where the table of contents is to be 
included in an itemize.
E.g.

   Foreword ........  I
1. Smth unrelated .. II
2. Author: Title ...  1
3. Author: Title ...  5

etc.
Only 2. and 3. come from a "list" of chapters, other entries are added manually.


The attached not-really-minimal working example also handles the author setup – 
IRL we use a lot of user variables for metadata that needs different 
representation in ToC and titling.

This is the core code:

\define[1]\ChapterTocEntry{%
  \startitem
    \structurelistuservariable{author}:
    #1\leaderfill\currentlistentrypagenumber
  \stopitem
}

\definelist[chapter][%
    alternative=b,
    interaction=all,
    criterium=all,
    textcommand=\ChapterTocEntry,
    pagecommand=\gobbleoneargument,
]

\startContentsList
%\sym{}Preface\leaderfill\at{Preface} % Preface unnumbered

\startitem Test entry\leaderfill 123 \stopitem

\placelist[chapter][criterium=all]

\stopContentsList


The actual problem:
The chapter list entries don’t adhere to the formatting of the itemize.
I guess there’s some expansion problem, due to the \startitem inside if the 
textcommand?


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

Attachment: toctest.tex
Description: Binary data

___________________________________________________________________________________
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