This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Creating "animations" figure subclass


OK.  The sequence of templates to output a figure title is:

   <xsl:template match="figure">  in formal.xsl

which calls:

  <xsl:template name="formal.object">  in formal.xsl

which calls:

  <xsl:template name="formal.object.heading"/> in formal.xsl

which does:

   <xsl:apply-templates select="$object" mode="object.title.markup">

The template that matches is:

  <xsl:template match="*" mode="object.title.markup">  in common/gentext.xsl

That template then does:

   <xsl:apply-templates select="." mode="object.title.template"/>

The template that matches is:

   <xsl:template match="*" mode="object.title.template"> in
common/gentext.xsl

That template calls 'gentext.template' to get the template for the current
element
in the title context.  If you want it select a different gentext template,
you could create a more
specific template match:

   <xsl:template match="figure[@role='animation']"
mode="object.title.template">

and customize its behavior.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Aidan Lister" <aidanis@gmail.com>
To: "Bob Stayton" <bobs@sagehill.net>; <docbook-apps@lists.oasis-open.org>
Sent: Tuesday, December 07, 2004 6:42 PM
Subject: Re: [docbook-apps] Creating "animations" figure subclass


> Hi Bob,
>
> I feel I've phrased my question horribly, I'll try again.
>
> I've successfully added separate LOT-chunk generation for animations.
> This works perfectly, everything is as it should be.
>
> However, I can't work out how to set the formal figure title. I.e. the
> title above each Figure in the article.
>
> Do you understand what I mean now? Sorry for the confusion!
> Aidan
>
>
> On Tue, 7 Dec 2004 18:36:28 -0800, Bob Stayton <bobs@sagehill.net> wrote:
> > Hi Aiden,
> > OK.  But you will notice in the List of Figures that it doesn't say
"Figure"
> > for each item. In fact, the TOC lines do not use the gentext templates
> > because they don't contain generated words.
> >
> > The template that is generating those lines in the List of Figures is:
> >
> > <xsl:template match="figure|table|example|equation|procedure"
mode="toc">
> >
> > This is in html/autotoc.xsl.  It first generates the number label with:
> >
> > <xsl:apply-templates select="." mode="label.markup"/>
> >
> > Then it inserts the $autotoc.label.separator. Then it does:
> >
> > <xsl:apply-templates select="." mode="titleabbrev.markup"/>
> >
> > Does this help?
> >
> >
> >
> > Bob Stayton
> > Sagehill Enterprises
> > DocBook Consulting
> > bobs@sagehill.net
> >
> > ----- Original Message -----
> > From: "Aidan Lister" <aidanis@gmail.com>
> > To: "Bob Stayton" <bobs@sagehill.net>
> > Cc: <docbook-apps@lists.oasis-open.org>
> > Sent: Tuesday, December 07, 2004 6:18 PM
> > Subject: Re: [docbook-apps] Creating "animations" figure subclass
> >
> > > Hi Bob,
> > >
> > > Nope, I mean the "Figure %n. %t" formal figure title. I know,
> > > somewhere, the l:template name="figure" template is called to get that
> > > text, I just don't know where.
> > >
> > > Thanks
> > >
> > >
> > > On Tue, 7 Dec 2004 09:22:08 -0800, Bob Stayton <bobs@sagehill.net>
wrote:
> > > > Do you mean the title at the top of the list?  The lists are
generated
> > by
> > > > the make.lots, template, which calls the list.of.titles template,
both
> > in
> > > > html/autotoc.xsl. In the list.of.titles template, you'll see the
choose
> > > > statement to select the gentext key, where it uses keys like
> > > > "ListofFigures". That's where the title comes from.
> > > >
> > > > Bob Stayton
> > > > Sagehill Enterprises
> > > > DocBook Consulting
> > > > bobs@sagehill.net
> > > >
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Aidan Lister" <aidanis@gmail.com>
> > > > To: <docbook-apps@lists.oasis-open.org>
> > > > Sent: Tuesday, December 07, 2004 7:30 AM
> > > > Subject: [docbook-apps] Creating "animations" figure subclass
> > > >
> > > > > Hi list,
> > > > >
> > > > > I have many figures in my document, however some of them are
> > > > > animations. I decided to use <figure role="animation" and use the
> > > > > customisation layer for the rest.
> > > > >
> > > > > I've successfully added separate LOT-chunk generation, but I can't
> > > > > work out how to set the title.
> > > > >
> > > > > I've created a new node in the gentext file (en.xml), but I can't
find
> > > > > any reference to the gentext template with regard to figures.
> > > > >
> > > > > If someone could tell me which file the gentext template for
figures
> > > > > is called, I'd be much appreciative.
> > > > >
> > > > > Thanks,
> > > > > Aidan
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]