OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] <partintro> deletes part TOC


The missing TOC when partintro is used is a bug in the fo stylesheet. I've fixed it in SVN. If you want to patch your customization layer, then copy the template named 'generate.part.toc' from fo/division.xsl and change this variable:

<xsl:variable name="nodes" select="reference|
                                                      preface|
                                                      chapter|
                                                      appendix|
                                                      article|
                                                      bibliography|
                                                      glossary|
                                                      index"/>

to:

<xsl:variable name="nodes" select="$part/reference|
                                    $part/preface|
                                    $part/chapter|
                                    $part/appendix|
                                    $part/article|
                                    $part/bibliography|
                                    $part/glossary|
                                    $part/index"/>

That template has the partintro as the context element when a partintro exists, but it is passed the part element as a template param named $part. But it wasn't using the param in selecting nodes for the TOC. Since the partintro does not contain preface, chapter, etc., it thought the TOC was empty. This patch makes sure it looks in the part element for content.

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


From: Xmplar
Sent: Thursday, March 14, 2013 4:46 PM
To: aleksey.tsalolikhin@bydeluxe.com ; DocBook Apps
Subject: Re: [docbook-apps] <partintro> deletes part TOC


I haven't got an answer for this yet Aleksey. I'm reposting it to the list in case someone else might have found a solution. However, my issue is not a part within a part - it is partintro in a part.

On 15-03-13 7:01 AM, Aleksey Tsalolikhin wrote:
Hi. Did you figure this out, please? I have a similar issue; if I have a part inside a book, I get the TOC for the part, but if I have a part inside a part inside a book, then I don't get a TOC for the part that is inside the book.


Best,
-at





On Tue, Feb 5, 2013 at 10:57 PM, Xmplar <info@xmplar.biz> wrote:

I was testing an FO customization to remove a part toc title by setting 'part toc' in template generate.toc, and wasn't able to. I have the customization in TDG (page 210) to add a toc to the part title page, plus I have my own customization to set the order of <partintro> and the part toc on recto and verso pages. I then tested output using the standard 1.78.0 stylesheets without customization.
For the first part title page, I have a partintro:
<part>
   <title>Part 1 title</title>
   <titleabbrev>Part 1 abbrevtitle</titleabbrev>
   <subtitle>The part subtitle goes here...</subtitle>
   <partintro>
     <title>Part introduction title goes here (optional)...</title>
     <subtitle>Part introduction subtitle goes here (optional)</subtitle>
     <info>
       <authorgroup>
         <author>
           <personname><firstname>Andrew</firstname><surname>Walker</surname></personname>
           <contrib>Senior Researcher</contrib>
         </author>
         <author>
           <personname><firstname>Brian</firstname><surname>Charleston</surname></personname>
           <contrib>Junior bottlewasher</contrib>
         </author>
       </authorgroup>
     </info>
<para>An introduction to the part can be put into para elements. </para>
     <mediaobject>
       <imageobject>
         <imagedata fileref="images/redlettucelogo.png" width="60mm"/>
       </imageobject>
     </mediaobject>
<para>An introduction (again) to the part can be put into para elements. </para>
     <para>Further info for part titlepage goes here...</para>
   </partintro>
   <xi:include href="book_chap1.xml">
     <xi:fallback>
       <para>
         <emphasis>FIXME: MISSING XINCLUDE CONTENT chap1</emphasis>
       </para>
     </xi:fallback>
   </xi:include>
 </part>

Using the standard stylesheets, I don't get a part toc generated. However, for the second part title page I don't have any additional content:
<part label="2">
   <title>Part 2 title</title>
   <titleabbrev>Part 2 abbrevtitle</titleabbrev>
   <xi:include href="book_chap2.xml">
     <xi:fallback>
       <para>
         <emphasis>FIXME: MISSING XINCLUDE CONTENT chap2</emphasis>
       </para>
     </xi:fallback>
   </xi:include>
   <xi:include href="book_chap3.xml">
     <xi:fallback>
       <para>
         <emphasis>FIXME: MISSING XINCLUDE CONTENT chap3</emphasis>
       </para>
     </xi:fallback>
   </xi:include>
 </part>

This does produce a part toc. What would be stopping the part toc from generating where there is partintro?


--
Dave Gardiner

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]