[NTG-context] ToC as itemize

Henning Hraban Ramm texml at fiee.net
Thu May 3 16:13:30 CEST 2018


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: toctest.tex
Type: application/octet-stream
Size: 1484 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180503/86ab2c3e/attachment.obj>


More information about the ntg-context mailing list
https://mailman.ntg.nl/pipermail/ntg-context/2018/091484.html
mailman.ntg.nl
crawl=CC-MAIN-2022-05
4537
application/http; msgtype=response
sha1:TYNZUCRZOBNG5RC6JFAP554EJB44RL76
<urn:uuid:a22a39f6-04c1-49c3-badc-0674d222fdde>
2022-01-18T16:50:42Z
5.39.185.232
text/html
sha1:WNHSADYVBQROM25IGC6NS7VA7QBZ6H37
<urn:uuid:b0b20e0b-a2bc-4cf6-93ba-ae4b748b38e0>
https://mailman.ntg.nl/pipermail/ntg-context/2018/091484.html
response
<urn:uuid:d973964d-7618-4c26-a934-e4497436d7b2>
isPartOf: CC-MAIN-2022-05
publisher: Common Crawl
description: Wide crawl of the web for January 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-78
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.3-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/