diff options
Diffstat (limited to 'fo/inline.xsl')
-rw-r--r-- | fo/inline.xsl | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/fo/inline.xsl b/fo/inline.xsl index 60abd77..b69dac2 100644 --- a/fo/inline.xsl +++ b/fo/inline.xsl @@ -10,7 +10,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: inline.xsl 9228 2012-02-01 21:50:25Z bobstayton $ + $Id: inline.xsl 9718 2013-01-30 18:29:51Z bobstayton $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -145,7 +145,35 @@ <xsl:copy-of select="$content"/> </xsl:otherwise> </xsl:choose> +</xsl:template> + +<xsl:template name="inline.sansseq"> + <xsl:param name="content"> + <xsl:call-template name="simple.xlink"> + <xsl:with-param name="content"> + <xsl:apply-templates/> + </xsl:with-param> + </xsl:call-template> + </xsl:param> + <fo:inline font-family="{$sans.font.family}"> + <xsl:choose> + <xsl:when test="@dir"> + <fo:inline> + <xsl:attribute name="direction"> + <xsl:choose> + <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when> + <xsl:otherwise>rtl</xsl:otherwise> + </xsl:choose> + </xsl:attribute> + <xsl:copy-of select="$content"/> + </fo:inline> + </xsl:when> + <xsl:otherwise> + <xsl:copy-of select="$content"/> + </xsl:otherwise> + </xsl:choose> + </fo:inline> </xsl:template> <xsl:template name="inline.charseq"> @@ -483,14 +511,14 @@ <xsl:template match="function/parameter" priority="2"> <xsl:call-template name="inline.italicmonoseq"/> - <xsl:if test="following-sibling::*"> + <xsl:if test="$function.parens != 0 and following-sibling::*"> <xsl:text>, </xsl:text> </xsl:if> </xsl:template> <xsl:template match="function/replaceable" priority="2"> <xsl:call-template name="inline.italicmonoseq"/> - <xsl:if test="following-sibling::*"> + <xsl:if test="$function.parens != 0 and following-sibling::*"> <xsl:text>, </xsl:text> </xsl:if> </xsl:template> @@ -532,7 +560,21 @@ </xsl:template> <xsl:template match="keycap"> - <xsl:call-template name="inline.boldseq"/> + <xsl:choose> + <xsl:when test="@function and normalize-space(.) = ''"> + <xsl:call-template name="inline.boldseq"> + <xsl:with-param name="content"> + <xsl:call-template name="gentext.template"> + <xsl:with-param name="context" select="'keycap'"/> + <xsl:with-param name="name" select="@function"/> + </xsl:call-template> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="inline.boldseq"/> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="keycode"> @@ -869,7 +911,7 @@ <fo:basic-link internal-destination="{$termid}" xsl:use-attribute-sets="xref.properties"> - <xsl:call-template name="inline.charseq"/> + <xsl:call-template name="inline.italicseq"/> </fo:basic-link> </xsl:otherwise> </xsl:choose> |