ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: John Culleton <john@wexfordpress.com>
Cc: ntg-context@ntg.nl
Subject: Re: Table of Contents
Date: Sat, 21 Jun 2003 11:03:07 -0400	[thread overview]
Message-ID: <200306211103.07761.john@wexfordpress.com> (raw)
In-Reply-To: <3EF349DF.88E61AE4@lamar.colostate.edu>

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 before 
the actual TOC the whole TOC becomes blank. This is true  whether the item is 
a chapter and included automatically or I use the "write" commands to do  it 
manually. Here is a dummy file:

\pdfoutput=1
\starttext
\chapter{foo}
\completecontent
\chapter{bar}
\stoptext

When I run the above file the TOC will have a header but no contents. If 
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 
\completecontent 
command then the TOC blanks out. 

This may be a function of The general TeX procedure to write out the items on 
one pass and bring them in on the next. The write to \chapter{foo} may 
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. So 
\chapter{foo} probalbly clobbers the external file.  Still the TOC mechanism 
should be developed in a way that it is possible to incorporate items 
occurring before the TOC in the TOC.  This is not an uncommon requirement. 

A cure might be to move the external file to a different file name at the end 
of each pass in texexec, and bring in that copy of the file instead of the 
original external file to create the actual TOC.. That way any premature 
references would not go to the copy but to a new original. Pehaps Hans could 
rewrite the texexec or the Content macros themselves to do this. In 
pseudocode of sorts it would work  like this:
\starttext
\chapter{foo} =write to filea    
\placecontent= read from fileb 
\chapter{bar}=write to filea
\chapter{alpha}=write to filea
(etc.)
\stoptext.
copy filea to fileb
end
-- 
John Culleton
Able Typesetters and Indexers

  parent reply	other threads:[~2003-06-21 15:03 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-18 17:44 John Culleton
2003-06-18 18:16 ` wmcclain
2003-06-18 18:25 ` Idris S Hamid
2003-06-18 19:38   ` John Culleton
2003-06-18 20:13     ` Idris S Hamid
2003-06-19  0:30       ` John Culleton
2003-06-19 17:08         ` John Culleton
2003-06-20 19:02           ` Idris S Hamid
     [not found]           ` <3EF349DF.88E61AE4@lamar.colostate.edu>
2003-06-21 15:03             ` John Culleton [this message]
2003-06-26  8:07               ` Hans Hagen
2003-06-26 16:33                 ` John Culleton
     [not found] <mailman.198.1457685375.2302.ntg-context@ntg.nl>
2016-03-11  9:32 ` Aidan Nichol
  -- strict thread matches above, loose matches on Subject: below --
2016-03-10 20:45 Aidan Nichol
2016-03-10 22:48 ` Pablo Rodriguez
2016-03-12  7:29   ` Wolfgang Schuster
2015-09-28 12:27 table of contents Meer, Hans van der
2015-09-28 13:31 ` Wolfgang Schuster
2012-07-09  9:43 Meer, H. van der
2012-07-09  9:54 ` Wolfgang Schuster
2012-07-09 10:10   ` Wolfgang Schuster
2012-07-09 11:26   ` Aditya Mahajan
2012-04-04 12:20 Table " John Devereux
2012-04-05  7:14 ` John Devereux
2012-04-05 10:13   ` Willi Egger
2012-04-05 10:51     ` John Devereux
2011-05-23 17:18 Oliver Buerschaper
2011-05-23 17:27 ` Wolfgang Schuster
2010-04-29 10:12 table " Marius
2010-04-29 10:19 ` Wolfgang Schuster
2010-04-29 13:17   ` Marius
2010-04-29 20:17     ` Marius
2010-04-30  6:55       ` Wolfgang Schuster
2010-04-30  8:41         ` Marius
2010-04-30 11:13           ` Wolfgang Schuster
2010-03-21  9:18 Table " Alain Delmotte
2010-03-21  9:36 ` Mari Voipio
2010-03-21  9:37 ` Wolfgang Schuster
2010-03-21 10:39   ` Alain Delmotte
2002-08-16 18:20 Table of Contents Peter Denisevich
2002-08-18 12:11 ` Hans Hagen
2002-08-15 14:29 table of contents Kris Hermans
2002-08-15 16:11 ` Hans Hagen
2000-09-09 13:25 Table " Zeljko Vrba
2000-09-09 13:58 ` Berend de Boer
2000-09-10  7:36   ` Zeljko Vrba
2000-09-10  9:09     ` Mr. Wang Lei
2000-09-11  8:30 ` Hans Hagen

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=200306211103.07761.john@wexfordpress.com \
    --to=john@wexfordpress.com \
    --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).