ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: pmlists@free.fr (Peter Münster)
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Is it possible to generate only a table of contents
Date: Fri, 18 Mar 2011 10:35:03 +0100	[thread overview]
Message-ID: <87aags3h6g.fsf@micropit.couberia.bzh> (raw)
In-Reply-To: <AANLkTinBpo5QRbWRM=oJCyN07Yhxw8_Gbzxg9rxnLFWz@mail.gmail.com> (Cecil Westerhof's message of "Fri, 18 Mar 2011 09:32:00 +0100")

Cecil Westerhof <cldwesterhof@gmail.com> writes:

> Is it possible to generate only a TOC? (\completecontent) When
> creating a document I like to have the 'stakeholders' to have an
> indication of what is going on. For this a TOC is enough. I could
> create the document and cut out the TOC, but it would be simpler if
> that could be auto generated.

Perhaps a starting point:

\startbuffer[mydocument]
\completecontent
\dorecurse{50}{\expanded{\chapter{Chapter \recurselevel}}}
\stopbuffer

\setuplayout[page]
\starttext
% Here, you must know the number of pages of the toc.
% Certaninly, this can be done much better!
\dorecurse{3}{\typesetbuffer[mydocument][page=\recurselevel]}
\stoptext

-- 
           Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


  parent reply	other threads:[~2011-03-18  9:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18  8:32 Cecil Westerhof
2011-03-18  9:09 ` Steffen Wolfrum
2011-03-18  9:35 ` Peter Münster [this message]
2011-03-18 11:19   ` luigi scarso

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=87aags3h6g.fsf@micropit.couberia.bzh \
    --to=pmlists@free.fr \
    --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).