ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ToC as itemize
Date: Sun, 10 Jun 2018 11:55:41 +0200	[thread overview]
Message-ID: <79EDD627-DED6-405C-82D5-2CCB53F79B09@fiee.net> (raw)
In-Reply-To: <24EAEB87-E083-43D0-AF6D-9E4A775BE735@fiee.net>

Might there be a solution to this problem?

I.e. how to insert ToC entries in an itemize?

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

Am 2018-05-03 um 16:13 schrieb Henning Hraban Ramm <texml@fiee.net>:

> 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
> 
> <toctest.tex>___________________________________________________________________________________
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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	other threads:[~2018-06-10  9:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 14:13 Henning Hraban Ramm
2018-06-10  9:55 ` Henning Hraban Ramm [this message]
2018-06-10 11:35   ` Hans Hagen
2018-06-10 12:03     ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79EDD627-DED6-405C-82D5-2CCB53F79B09@fiee.net \
    --to=texml@fiee.net \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).