This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] mediaobject phrase as caption for figure
- From: Bob Stayton <bobs at sco dot com>
- To: David Pratt <prattda at assiniboine dot net>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Wed, 7 May 2003 10:45:34 -0700
- Subject: Re: [docbook-apps] mediaobject phrase as caption for figure
- References: <A4FB74E0-80B0-11D7-A6E5-000393D42CE4@assiniboine.net>
Actually, you can do this without a customization.
Change the textobject to caption and phrase to para,
and you will get a caption below your picture.
The textobject is really meant as a substitute for
the graphic when the content is presented in a
non-graphical output mode.
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
On Wed, May 07, 2003 at 12:23:40PM -0500, David Pratt wrote:
> I am interested in using my phrase text as a caption underneath my
> image in my output for chunked xhtml output so it results in this:
>
> <div class="figure">
> <a id="id542272"/>
> <p class="title">
> <b>Figure?7.16.?My Figure</b>
> </p>
> <div class="mediaobject">
> <img src="myfigure.jpg" alt="My figure described"/>
> </div>
> <p class="imagecaption"> <!-- this is
> what I want to add -->
> My figure described <!--
> this is what I want to add -->
> </p>
> <!-- this is what I want to add -->
> </div>
>
> from this:
>
> <figure>
> <title>My Figure</title>
> <mediaobject>
> <imageobject>
> <imagedata fileref="myfigure.jpg"
> format="JPG" />
> </imageobject>
> <textobject>
> <phrase>My figure described</phrase>
> </textobject>
> </mediaobject>
> </figure>
>
> In the graphics.xsl template in the xhtml folder, I have located the
> mediaobject template. Just under this, I located the
> simple template for textobject.
>
> I have added the following to my xhtml chunk customization but I get
> nothing.
>
> <!-- Generate an image caption underneath each image -->
>
> <xsl:template match="mediaobject/textobject/phrase">
> <p class="imagecaption">
> <xsl:value-of select="."/>
> </p>
> </xsl:template>
>
> I have also tried this with template match="phrase" since the the
> textobject template simply applies templates.
> Any recommendations on how to achieve the desired would be much
> appreciated.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org