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. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
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
On Mon, 2012-04-09 at 00:08 -0400, Aditya Mahajan wrote:
\def\loaddatafile#1% {\ctxlua { job.initialize("#1.tuc","#1.tua") }}%
\loaddatafile{full-book} %with the .tex extension
\starttext \placelist[chapter] \stoptext
Thanks Aditya, but I tried doing that. ConTeXt doesn't seem to emit an error, but neither does it a PDF. I've attached the output log. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Sun, 8 Apr 2012, Kip Warner wrote:
On Mon, 2012-04-09 at 00:08 -0400, Aditya Mahajan wrote:
\def\loaddatafile#1% {\ctxlua { job.initialize("#1.tuc","#1.tua") }}%
\loaddatafile{full-book} %with the .tex extension
Sorry, this should have read: WITHOUT the .tex extension
\starttext \placelist[chapter] \stoptext
Aditya
On Mon, 2012-04-09 at 04:07 -0400, Aditya Mahajan wrote:
Sorry, this should have read: WITHOUT the .tex extension
I tried both with and without it. ConTeXt doesn't appear to raise any error and it doesn't generate a PDF. I've attached the log in case it is helpful. Thanks for your help Aditya. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
On Mon, 9 Apr 2012, Kip Warner wrote:
On Mon, 2012-04-09 at 04:07 -0400, Aditya Mahajan wrote:
Sorry, this should have read: WITHOUT the .tex extension
I tried both with and without it. ConTeXt doesn't appear to raise any error and it doesn't generate a PDF. I've attached the log in case it is helpful.
It works at my end (but I am using a 1.5 month old beta), so sorry, I cannot say what is going wrong with your file. Did you try it with a small example file to see if that works? Aditya
On Mon, 2012-04-09 at 21:57 -0400, Aditya Mahajan wrote:
It works at my end (but I am using a 1.5 month old beta), so sorry, I cannot say what is going wrong with your file.
Did you try it with a small example file to see if that works?
I haven't tried with a minimal, but I think what I will end up doing is just extracting the pages manually using pdftk. The direct ConTeXt method is rather cumbersome and difficult to get working on a very large and convoluted document, like my book. Thanks for your help anyways Aditya. Helpful as always. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
participants (2)
-
Aditya Mahajan
-
Kip Warner