From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12550 Path: main.gmane.org!not-for-mail From: John Culleton Newsgroups: gmane.comp.tex.context Subject: Re: Table of Contents Date: Sat, 21 Jun 2003 11:03:07 -0400 Sender: ntg-context-admin@ntg.nl Message-ID: <200306211103.07761.john@wexfordpress.com> References: <200306181344.04671.john@wexfordpress.com> <200306191308.42815.john@wexfordpress.com> <3EF349DF.88E61AE4@lamar.colostate.edu> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1056208195 29137 80.91.224.249 (21 Jun 2003 15:09:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 21 Jun 2003 15:09:55 +0000 (UTC) Cc: ntg-context@ntg.nl Original-X-From: ntg-context-admin@ntg.nl Sat Jun 21 17:09:53 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Tk00-0007Zo-00 for ; Sat, 21 Jun 2003 17:09:53 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 70DE510B1B; Sat, 21 Jun 2003 17:09:57 +0200 (MEST) Original-Received: from mta7.adelphia.net (mta7.adelphia.net [64.8.50.193]) by ref.ntg.nl (Postfix) with ESMTP id 69B0A10B15 for ; Sat, 21 Jun 2003 17:05:12 +0200 (MEST) Original-Received: from publish ([68.170.242.222]) by mta7.adelphia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20030621150510.FCIY1347.mta7.adelphia.net@publish>; Sat, 21 Jun 2003 11:05:10 -0400 Original-To: ishamid@colostate.edu User-Agent: KMail/1.4.1 In-Reply-To: <3EF349DF.88E61AE4@lamar.colostate.edu> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12550 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12550 On Friday 20 June 2003 01:52 pm, Idris S Hamid wrote: > > Here is what my customer want:s: > > 1. A TOC > > 2. No chapter or section numbers anywhere. > > I think we've solved these two; > > > 3. Certain blocks of text which occur before the TOC to be listed in = the > > TOC with the correct page number. > > What's the difference between 1 & 3? Could you explain 3 a bit more:-) > As I explained before, whenever a TOC item appears in the source file bef= ore=20 the actual TOC the whole TOC becomes blank. This is true whether the ite= m is=20 a chapter and included automatically or I use the "write" commands to do = it=20 manually. Here is a dummy file: \pdfoutput=3D1 \starttext \chapter{foo} \completecontent \chapter{bar} \stoptext When I run the above file the TOC will have a header but no contents. If=20 however I comment out \chapter{foo} then chapter bar appears in the contents. I have also tried the write etc. commands and if they appear before the=20 \completecontent=20 command then the TOC blanks out.=20 This may be a function of The general TeX procedure to write out the item= s on=20 one pass and bring them in on the next. The write to \chapter{foo} may=20 reinitialize the external file when it is encountered on the second pass. According to the TeXbook the write occurs when the page is shipped out. S= o=20 \chapter{foo} probalbly clobbers the external file. Still the TOC mechan= ism=20 should be developed in a way that it is possible to incorporate items=20 occurring before the TOC in the TOC. This is not an uncommon requirement= =2E=20 A cure might be to move the external file to a different file name at the= end=20 of each pass in texexec, and bring in that copy of the file instead of th= e=20 original external file to create the actual TOC.. That way any premature=20 references would not go to the copy but to a new original. Pehaps Hans co= uld=20 rewrite the texexec or the Content macros themselves to do this. In=20 pseudocode of sorts it would work like this: \starttext \chapter{foo} =3Dwrite to filea =20 \placecontent=3D read from fileb=20 \chapter{bar}=3Dwrite to filea \chapter{alpha}=3Dwrite to filea (etc.) \stoptext. copy filea to fileb end --=20 John Culleton Able Typesetters and Indexers