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] Re: formatting in <title> is lost


On Wed, 21 Mar 2007, Bob Stayton wrote:

> When I test it, I get the xref in the title to resolve properly.  The
> keycap, on the other hand, outputs only a <span> with no class attribute.
> That's a bug, as there is no way for CSS to know how to style it.
>

Sorry for replying so late, but I had to dig a little into things in order
to understand what was causing xref to get ignored:

Some month ago, I posted a question on how to get figure titles formatted
as

 Figure X.Y: bla bla

Here 'Figure X.Y' should be bold, whereas the rest of the caption should
be ordinary body text. I think Bob came up with the following suggestion
(http://lists.oasis-open.org/archives/docbook-apps/200701/msg00115.html):

This part customizes the gentext template:

<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&#160;%n.&#160;"/>
   </l:context>
  </l:l10n>
</l:i18n>

This is the customized formal.object.heading:

<xsl:template name="formal.object.heading">
  <xsl:param name="object" select="."/>
  <xsl:param name="title">
    <xsl:apply-templates select="$object" mode="object.title.markup">
      <xsl:with-param name="allow-anchors" select="1"/>
    </xsl:apply-templates>
  </xsl:param>

  <p class="title">
    <xsl:choose>
      <xsl:when test="self::figure">
        <b>
          <xsl:copy-of select="$title"/>
        </b>
        <xsl:apply-templates select="." mode="title.markup"/>
      </xsl:when>
      <xsl:otherwise>
        <b>
          <xsl:copy-of select="$title"/>
        </b>
      </xsl:otherwise>
    </xsl:choose>
  </p>

</xsl:template>

Inserting this redefinition in the cust. layer removes the formatting of
the xref. Any ideas on how to fix this?

It also strange that a <keycap> or <mousebutton> looses its class output
in the HTML output. A <guimenuitem> goes through just fine, and both are
defined in inline.xsl as

<xsl:template match="keycap">
  <xsl:call-template name="inline.boldseq"/>
</xsl:template>

<xsl:template match="mousebutton">
  <xsl:call-template name="inline.charseq"/>
</xsl:template>

<xsl:template match="guimenuitem">
  <xsl:call-template name="inline.charseq"/>
</xsl:template>

I believe this also will be true for XHTML and FO output as well.

Best regards,

Mads





> Bob Stayton
> Sagehill Enterprises
> DocBook Consulting
> bobs@sagehill.net
>
>
> ----- Original Message -----
> From: "Mads Ipsen" <mpi@osc.kiku.dk>
> To: "Norman Walsh" <ndw@nwalsh.com>
> Cc: <docbook-apps@lists.oasis-open.org>
> Sent: Tuesday, March 20, 2007 11:58 PM
> Subject: Re: [docbook-apps] Re: formatting in <title> is lost
>
>
> On Tue, 20 Mar 2007, Norman Walsh wrote:
>
> > / Mads Ipsen <mpi@osc.kiku.dk> was heard to say:
> > | If I do something like:
> > |
> > |     <figure id=3D"fig.mbmain.water">
> > |       <title>
> > |         Water molecule constructed with Molecular Builder. The
> > |         molecule was obtained simply by hovering the mouse over
> > |         the carbon atom in the &methane; molecule shown in
> > |         <xref linkend=3D"fig.mbmain.methane="/> and pressing the
> > |         <keycap>O</keycap> key.
> > |       </title>
> > |       ...
> > |     </figure>
> > |
> > | then the xref link and the keycap formatting is lost in the figure
> > title
> > | generated by the html.xsl style sheets. Within the ordinary text body,
> > | these structures off course come out fine.
> > |
> > | Any (simple) solutions?
> >
> > It works for me:
> >
> >   Figure 1. Water molecule constructed with Molecular Builder. The
> >   molecule was obtained simply by hovering the mouse over the carbon
> >   atom in the methane molecule shown in Figure 2, "Methane molecule
> >   constructed with Molecular Builder." and pressing the O key.
> >
> > What processor, version, etc. are you using?
> >
> >                                         Be seeing you,
> >                                           norm
> >
> > --
> > Norman Walsh <ndw@nwalsh.com>      | Few men are so sufficiently
> > http://www.oasis-open.org/docbook/ | discerning to appreciate all the
> > Chair, DocBook Technical Committee | evil that they do.--La
> >                                    | Rochefoucauld
> >
>
> Hey,
>
> Here are some specifics:
>
> xsltproc --version
> ===================
> Using libxml 20626, libxslt 10117 and libexslt 813
> xsltproc was compiled against libxml 20626, libxslt 10117 and libexslt 813
> libxslt 10117 was compiled against libxml 20626
> libexslt 813 was compiled against libxml 20626
>
> HTML XSL style sheets:
> ======================
> 1.72.0
>
> DTD:
> ======
> DocBook XML DTD V4.5
>
> Best,
>
> Mads
>
> +---------------------------------+-------------------------+
> | Mads Ipsen                      |                         |
> | Dept. of Chemistry              | phone:     +45-35320220 |
> | H.C.Ørsted Institute            | fax:       +45-35320322 |
> | Universitetsparken 5            |                         |
> | DK-2100 Copenhagen Ø, Denmark   | mpi@osc.kiku.dk         |
> +---------------------------------+-------------------------+
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>
>
>

+---------------------------------+-------------------------+
| Mads Ipsen                      |                         |
| Dept. of Chemistry              | phone:     +45-35320220 |
| H.C.Ørsted Institute            | fax:       +45-35320322 |
| Universitetsparken 5            |                         |
| DK-2100 Copenhagen Ø, Denmark   | mpi@osc.kiku.dk         |
+---------------------------------+-------------------------+


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