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] boxing words


> -----Original Message-----
> From: Julian Onions 
> 
> I'm new to docbook and its syntax, and I'm trying to 
> replicate an existing look.
> This has keyboard input set in fixed-width text but 
> surrounded by a box.
> I'm currently using <keycap>F1</keycap> within the docbook, 
> but I'm unsure how to do the border.
> 
> I can get the html versions of this to work ok, using a CSS 
> style, and attaching it to the appropriate <span> construct. 
> I've no idea how to do the same in PDF/FO though. 
> 
> I use the following CSS in HTML, and am looking to try and 
> get something close in PDF. 
> {
>     font-weight: normal;
>     font-variant: small-caps;
>     border-style: solid;
>     border-width: 1px;
>     border-color: black;
>     color: black;
> }


See http://www.sagehill.net/docbookxsl/CustomInlines.html for general
information about customizing inlines.

Here is customization of the template for <keycap> that does what you want:

<xsl:template match="keycap">
<fo:inline font-weight="normal"
    font-variant="small-caps"
    border-style="solid"
    border-width="1px"
    border-color="black"
    color="black">
    <xsl:call-template name="inline.charseq"/>
</fo:inline>
</xsl:template>


How this actually looks in the PDF file is another matter (it depends on the
FO processor). For example, XEP does not support the font-variant property. 

FOP 0.20.5 does not support border properties on fo:inline
(http://marc.theaimsgroup.com/?l=fop-user&m=112195172818550&w=2). On the
other hand, FOP does not claim support for font-variant
(http://xml.apache.org/fop/compliance.html), but that one does work!


> Along similar lines, I'd like to be able to get <application> 
> text rendered in green - which I imagine is a similar set of steps. 


Left as an exercise for the reader :-). 


/MJ





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