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] Changing Table headers

On Thu, Apr 10, 2003 at 06:36:42PM -0400, Scott Anguish wrote:
> I've figured out how to move Table/Figure and other headers to the 
> bottom of the image by adding
> <xsl:param name="formal.title.placement">
> figure after
> example before
> equation before
> table before
> procedure before
> </xsl:param>
> to my custom .xsl file...  (this is great BTW... I wish it was 
> documented someplace)

Well, it is mentioned in:


under "Figure, table, and other title".
> The next change I need to make is a bit more extreme though.
> I'd prefer
> <p class="title"><span class="title-header">Figure 1:</span> title 
> contents</p>
> to having the entire thing bolded.
> I've found where this bolding is done, and removed it entirely, but how 
> do I add it back in as above?

Add this to your customization layer:

<xsl:template name="formal.object.heading">
  <xsl:param name="object" select="."/>
  <p class="title">
      <xsl:when test="local-name($object) = 'figure'">
        <span class="title-header">
          <xsl:apply-templates select="$object" mode="object.title.markup">
            <xsl:with-param name="allow-anchors" select="1"/>
        <xsl:text> </xsl:text>
        <xsl:apply-templates select="$object" mode="title.markup">
          <xsl:with-param name="allow-anchors" select="1"/>
          <xsl:apply-templates select="$object" mode="object.title.markup">
            <xsl:with-param name="allow-anchors" select="1"/>

<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
  <l:l10n language="en">
    <l:context name="title">
      <l:template name="figure" text="Figure %n:"/>

This customizes the 'formal.object.heading' template
that outputs the title.  The original is found
in html/formal.xsl.  When the element is a figure,
I removed the <b> tags, as you probably already did.
Then I use object.title.markup to output just the "Figure
N:" part by changing the gentext template for figure
in context "title" to output just the label and number.
That's the second part in the 'local.l10n.xml' parameter.
Then I close the <span>, output text space, and use the
'title.markup' template, which outputs just the title.

I keep the original processing steps in the
xsl:otherwise part to handle non-figure formal objects.
You can expand the test to include tables, examples, etc.


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

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