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
At 11:03 21/06/2003 -0400, you wrote:
On Friday 20 June 2003 01:52 pm, Idris S Hamid wrote:
\pdfoutput=1
never set the output this way, use \setupoutput[pdftex] or --pdf becuase these commands make sure that the right low level special drivers are loaded! 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 -------------------------------------------------------------------------
On Thursday 26 June 2003 04:07 am, Hans Hagen wrote:
At 11:03 21/06/2003 -0400, you wrote:
On Friday 20 June 2003 01:52 pm, Idris S Hamid wrote:
\pdfoutput=1
never set the output this way, use \setupoutput[pdftex] or --pdf becuase these commands make sure that the right low level special drivers are loaded!
Hans Thanks for the reminder! It was my jmistake, not Idris'.
However the corrected file still doesn't show any TOC entries in its original form, but will show TOC entries if the first chapter is removed or moved past the \combinedcontent statement. -------------------------------------------------------------------------------------- \setupoutput[pdftex] \starttext \chapter{foo} \completecontent \chapter{bar} \stoptext ------------------------------------------- The above does not work. ---------------------------------------- \setupoutput[pdftex] \starttext \completecontent \chapter{foo} \chapter{bar} \stoptext ------------------------------------- But the above does work. So I deduce that the TOC mechanism doesn't handle entries occurring before the \completecontent statement. I proposed a cure in another post, but it would requre some modification of texexec. Best, -- John Culleton Able Typesetters & Indexers http://wexfordpress.com
participants (2)
-
Hans Hagen
-
John Culleton