From: Thangalin <thangalin@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Rearrange Table of Contents section page numbers
Date: Fri, 31 Jan 2014 14:20:52 -0800 [thread overview]
Message-ID: <CAANrE7p5ew7w_Ohv7c7nLqz4Z=gE7=tqRP+ypdBg55QSuT2ePg@mail.gmail.com> (raw)
Hi,
I am trying to recreate the following ToC entries:
http://i.stack.imgur.com/ig6LX.png
The code on the wiki uses:
\doifelse\currentlistentrylocation{\structureheadlocation{chapter}}
{{\bfb\currentlistentrytitle}}
{ \currentlistentrytitle}\NC\NR
However, there are syntax errors and the conditional expression
assumes that the ToC is being placed on every page. This assumption
allows it to resolve the namedstructureheadlocation value. For a ToC
at the start of a document, there is no "current chapter" and so the
head location for the chapter entry returns 0.
Here is what I have so far:
\startsetups [list:TOC]
\starttabulate
\currentlistentrypagenumber{} \hskip 1em \NC \currentlistentrytitle{} \NR
\stoptabulate
\stopsetups
\definelistalternative
[TOC]
[renderingsetup=list:TOC]
% Format the ToC style.
\setupcombinedlist[content][
alternative=TOC,
]
\starttext
\completecontent
\startchapter [title=alpha] \stopchapter
\startsection[title=alphasec] \stopsection
\startchapter [title=beta] \stopchapter
\startsection[title=alphasec] \stopsection
\startchapter [title=gamma] \stopchapter
\startsection[title=alphasec] \stopsection
\stoptext
How do you determine whether or not the chapter title should be displayed?
Thank you!
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2014-01-31 22:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 22:20 Thangalin [this message]
2014-02-01 8:59 ` Wolfgang Schuster
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='CAANrE7p5ew7w_Ohv7c7nLqz4Z=gE7=tqRP+ypdBg55QSuT2ePg@mail.gmail.com' \
--to=thangalin@gmail.com \
--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).