Hello all,

In peardoc we're facing the problem described in bug #46415 [1].
PhD automatically puts the first section of a chapter on its parent's
(the chapter's) chunk:
<chapter>
 <para>...</para>
 <section>1</section>
 <section>2</section>
 <section>3</section>
</chapter>

Phd generated three pages for this scenario:
- one for the chapter, including the first section
- one for each of the other sections

This is great behavior for introductionary sections, but it completely
fails for sections that have subsections themselves. It leads to the
title of section 1 being on the chapter page, the TOC being malformed
(subsections of section 1 are on the same level as section 2 and 3).

So the chunker in PhDReader.class.php should decide to chunk the
section in isSectionChunk() if the section has subsections itself.
Unfortunately, PhD doesn't read ahead so we don't know if the current
section has subsections in advance. We *could* make PhDReader move
ahead to the next CHUNK_ME element or the section's closing tag and go
back to the opening section tag then. This could mean a performance
loss (though I didn't do any measurements).

Any ideas how we could do this differently?


[1] http://bugs.php.net/?id=46415

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-

Attachment: signature.asc
Description: PGP signature

Reply via email to