[texhax] TOC problems
Lars Madsen
daleif at imf.au.dk
Thu Oct 16 01:35:08 CEST 2008
Andy Farnell wrote:
>
> Thanks for reponse Lars,
>
> I have discovered something that seems relevant, a correlation between
> the main.toc file and the errant behaviour.
>
> The book comprises 4 parts, theory, tools, technique and practicals.
>
> Parts 1-3 are fine. These are very orthodox with sections, subsections
> and so forth. They print fine in the TOC.
>
> Part 4 is special, because each chapter follows exactly the same section
> structure - Aims, Analysis, Methods, DSP code, Results, Conclusions etc.
> Because of this I do not want the sections to show up, so I use
> \section*{} throughout.
>
> I have elected to make the TOC depth to the sections level, which gives
> the optimal information but no more.
>
> The result is that main.toc follows a traditional format
> Part 1
> Chapter 1
> Section 1
> Subsection 1 ...
> Section 2 ...
>
> Chapter 2
> Section 1 ...
>
> Part 2 ...
>
> (of course only the Parts, Chapters and Sections print in TOC)
>
> all the way up to
>
> Part 4
>
> but then there are no other entries deeper than chapter, so it continues
>
> Chapter n
> Chapter n+1
> Chapter n+2 ...
>
> Here is where the problem starts.
>
> Latex doesn't want to split these over a page.
>
> I'm considering some options such as trying to use
>
> \addtocontents{toc}{\protect\newpage} to force a page break.
>
>>From the tocloft manual
>
> "You may get undesired page breaks in the ToC. For example you may have
> long multiline section title and in the ToC there is a page break between
> the lines. After your document is stable you can use \addtocontents at
> appropriate places in the body of the document to adjust the page breaking
> in the ToC."
>
> QUESTION:
>
> Is it a fair assumption that the .toc file effectively isolates the
> TOC printing from any other prior code that produced it? If so
> the problem seems related to the lack of any children to chapters.
>
> Have I found a bug?
>
> Is there a possible remedy like inserting some kind of invisible
> child level to chapter in Part 4?
>
> Thankyou for any thoughts,
>
> Andy Farnell
>
>
I cannot say, I need to see what generates the .toc file, and thus have
something I can run on my system.
Also I don;t know which class you are using, and what is \contentsfinish
and how does those lines appear.
Please create a minimal example that we can run, that produces the bad TOC.
/daleif
More information about the texhax
mailing list