This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] one more question about italics and <lineannotation>s
- From: Bob Stayton <bobs at sco dot com>
- To: "Robert P. J. Day" <rpjday at mindspring dot com>
- Cc: docbook apps list <docbook-apps at lists dot oasis-open dot org>
- Date: Tue, 27 May 2003 16:04:52 -0700
- Subject: Re: [docbook-apps] one more question about italics and <lineannotation>s
- References: <Pine.LNX.4.44.0305151036020.20541-100000@dell>
On Thu, May 15, 2003 at 10:42:55AM -0400, Robert P. J. Day wrote:
>
> (ok, one more question and i should be able to get back to work
> and type furiously for a while.)
>
> a while back, i put in a request that <lineannonation>s should
> be automatically italicized, since that makes more sense if you're
> commenting lines of code to see the annotation in a different
> style.
>
> currently, with the 1.61.0 stylesheets, that's exactly
> what happens, as the following excerpt from fo/inline.xsl
> shows:
>
>
> <xsl:template match="lineannotation">
> <fo:inline font-style="italic">
> <xsl:call-template name="inline.charseq"/>
> </fo:inline>
> </xsl:template>
>
>
> so far, so good, but it's still not ideal, as the l.a.
> is, by default, rendered in italicized monospace font,
> which still doesn't look great. i'd like to customize
> my stylesheet one more time to have l.a.s be the italicized
> form of the standard serif font, which is the way i've
> seen *most* books do it.
>
> not being an expert at FO stuff yet, what would it take
> to customize the above to add that the font body should
> be non-monospace?
>
> and what are the chances of extending the definition
> of <lineannotation> to support something like this? having
> it restricted to italicized monospace is a bit inflexible.
>
> thanks for all the advice thus far. some day, i hope to
> be able to contribute something back. :-)
I use this in my customization layer to achieve that effect:
<xsl:template
match="programlisting/lineannotation|literallayout/lineannotation">
<fo:inline font-family="{$body.font.family}"
font-style="italic">
<xsl:call-template name="inline.charseq"/>
</fo:inline>
</xsl:template>
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org