On Sun, 8 Apr 2012, Kip Warner wrote:

Hey list,

Is it possible to instruct ConTeXt to generate just the table of
contents, skipping all other front matter, back matter, appendices, body
matter, etc.? For example, only the following I'd like to see in the
outputted PDF:

   % Contents at a glance...
   \title{Contents at a Glance}
   \placelist[chapter]

   % Complete table of contents...
   \title{Table of Contents}
   \placecontent

Right now I am generating the full book, but then passing through pdftk
manually to extract just the pages that fall within the aforementioned.

I tried putting the aforementioned code in its own product file and then
passing that through ConTeXt with the book's environment, but the
problem is that the TOC now has nothing in it, of course.

I don't know if there is proper interface to this, but you can just load the tuc file and reuse the labels.

\def\loaddatafile#1%
    {\ctxlua {
        job.initialize("#1.tuc","#1.tua")
    }}%

\loaddatafile{full-book} %with the .tex extension

\starttext
\placelist[chapter]
\stoptext


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

Reply via email to