![](https://secure.gravatar.com/avatar/7cf61f7d52209424d472fffa80560a39.jpg?s=120&d=mm&r=g)
Suppose I create this document:
\starttext \completecontent \chapter{One} \input tufte \chapter{Two} \input douglas \stoptext
I get a document with a content list and two chaqpters. Now I want to do the same in a project. I take the example from the manual and do this:
%% %% This is the file book.tex %% \startproduct book \project teoade
\startfrontmatter \completecontent \stopfrontmatter
\startbodymatter \component chapters/chapter1 \component chapters/chapter2 \stopbodymatter
\startbackmatter \completeindex \stopbackmatter \stopproduct
I get the chapters allright, but the list of contents and the index are empty. Why? Thanks, Gerben
![](https://secure.gravatar.com/avatar/da2e9612e82768405be5895efa10ed77.jpg?s=120&d=mm&r=g)
Hello Gerben, I am a beginner myself, and working on a book project too. Below I send you my complete directory setup with sample files. I am happy with the set-up and it might also be useful for you. Matthias Directory structure: sas.tex % main project file layout.tex % main layout file screenbook/screenbook.tex % product file part1/chapter1/chapter1.tex part1/chapter1/section1/section1.tex And here the files: % sas.tex: \startproject sas \environment layout \product screenbook/screenbook \stopproject %layout.tex % contains definitions and 'styles' relevant for all products \startenvironment layout \setuppagenumbering[location={footer,middle}] \setuphead [chapter] [numberstyle=bold, textstyle=cap, before=\hairline\blank, after={\nowhitespace\hairline\blank[line]}] \stopenvironment % screenbook/screenbook.tex % contains definitions for the relevant product % Maybe this can be moved to a secondary environment file, % I haven't tried that yet. \startproduct screenbook \setupcolors[state=start] \project sas \setuppapersize[S6][S6] \startfrontmatter \starttext \startstandardmakeup \midaligned{My Little Book --- Screen Version} \midaligned{by} \midaligned{Myself} \stopstandardmakeup \stoptext \completecontent \stopfrontmatter \startbodymatter \component part1/part1 \component part2/part2 \component part3/part3 \component part4/part4 \stopbodymatter \startbackmatter \completeindex \stopbackmatter \stopproduct % part1/chapter1/chapter1.tex \chapter{My first chapter} \starttext This is about whatever I have to say. \input part1/chapter1/section1/section1 \stoptext % part1/chapter1/section1/section1.tex % put all helper (images etc) files in this directory, too % This file contains the actual text and doesn't see the project structure % anymore. \section{My first section} blah blah blah
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
At 14:27 06/08/2003 +0200, you wrote:
Suppose I create this document:
\starttext \completecontent \chapter{One} \input tufte \chapter{Two} \input douglas \stoptext
I get a document with a content list and two chaqpters. Now I want to do the same in a project. I take the example from the manual and do this:
%% %% This is the file book.tex %% \startproduct book \project teoade
\startfrontmatter \completecontent \stopfrontmatter
\startbodymatter \component chapters/chapter1 \component chapters/chapter2 \stopbodymatter
\startbackmatter \completeindex \stopbackmatter \stopproduct
I get the chapters allright, but the list of contents and the index are empty. Why?
because they are produced on a per section basis depending on where you call for them (for instance, in a chapter you can say \placelist[section] and get a locat toc) \completecontent[way=bytext] gives you a document one Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------
participants (3)
-
Gerben Wierda
-
Hans Hagen
-
Matthias Weber