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] | [Elist Home]


Subject: RE: DOCBOOK-APPS: Including Procedures in TOC?


This isn't too hard to do, but would make a good feature request. I added the same thing and the notion of 'Procedures' has been popular with the users of our docs. One even asked if we could include procedures in the pdf bookmarks pane. 

There's a list.of.unknowns hook in autotoc.xsl that makes it easier to add. Be sure not to include procedures without titles. The changes below are from the fo xsls:

You need this (modifying a template in autotoc.xsl):
 
<xsl:template match="figure|table|example|equation|procedure[title]" mode="toc">
  <xsl:call-template name="toc.line"/>
</xsl:template>

In division.xsl, you'll need to add something like this in a few places:

  <xsl:if test="contains($toc.params,'procedure') and .//procedure[title]">
    <fo:page-sequence hyphenate="{$hyphenate}"
                      format="i"
                      master-reference="{$master-reference}">
      <xsl:attribute name="language">
        <xsl:call-template name="l10n.language"/>
      </xsl:attribute>
      <xsl:if test="$double.sided != 0">
        <xsl:attribute name="force-page-count">auto-odd</xsl:attribute>
      </xsl:if>

...so you can use the generate.toc param to control whether a list of procedures appears.

You'll need to add this to your l10n customizations so the list of procedures will have a title:
                                                                               
   <l:gentext key="ListofUnknown" text="List of Procedures"/>                                                                                                
   <l:gentext key="listofunknown" text="List of Procedures"/>        

There are probably some other things I'm forgetting, but that should get you started :)

David

> -----Original Message-----
> From: Andy Jewell [mailto:andy_jewell@fanniemae.com]
> Sent: Tuesday, December 03, 2002 11:15 AM
> To: Docbook List
> Subject: DOCBOOK-APPS: Including Procedures in TOC?
> 
> 
> I have a lot of procedures in my documents.  Currently, the TOC
> generation is working great but doesn't by default include 
> procedures -
> which also don't seem to be classified as "formal" components such as
> are figures (am I getting this right?).
> 
> Can anyone give me an idea on what I would do to go about getting
> procedures included in the TOC - either with the TOC or as a separate
> list?  Thanks for any help you can offer!
> 
> 
> -- Andy
> 
> 
> 


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


Powered by eList eXpress LLC