aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabor Kovesdan <gabor@FreeBSD.org>2013-07-21 22:16:16 +0000
committerGabor Kovesdan <gabor@FreeBSD.org>2013-07-21 22:16:16 +0000
commit04740982cc1806b9d837eb2a9c21f668dbc68843 (patch)
tree847ac4076a6d105262356e462facf1e4a7183061
parent88d49943b06b9403c9939cd4c6190db2d0c843d6 (diff)
downloaddoc-04740982cc1806b9d837eb2a9c21f668dbc68843.tar.gz
doc-04740982cc1806b9d837eb2a9c21f668dbc68843.zip
- Render blue links by default.
- Add support for a single variable that indicated whether we are building for screen or for print. In the latter case, blue links are disabled and the URI of links is included in a footnote.
Notes
Notes: svn path=/projects/db5/; revision=42359
-rw-r--r--share/xsl/freebsd-fo.xsl27
1 files changed, 26 insertions, 1 deletions
diff --git a/share/xsl/freebsd-fo.xsl b/share/xsl/freebsd-fo.xsl
index f7efbfe0e8..6d7f46293f 100644
--- a/share/xsl/freebsd-fo.xsl
+++ b/share/xsl/freebsd-fo.xsl
@@ -17,6 +17,15 @@
<!-- Include customized FO titlepage -->
<xsl:import href="freebsd-fo-titlepage.xsl"/>
+ <xsl:param name="print">0</xsl:param>
+
+ <xsl:variable name="link.color">
+ <xsl:choose>
+ <xsl:when test="$print = 1">black</xsl:when>
+ <xsl:otherwise>blue</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<!--
FO-SPECIFIC PARAMETER SETTINGS
-->
@@ -92,6 +101,16 @@
<xsl:param name="body.font.master">9.5</xsl:param>
<xsl:param name="monospace.font.family">DejaVu Sans Mono</xsl:param>
+ <!-- Linking -->
+ <xsl:param name="ulink.show" select="$print"/>
+ <xsl:param name="ulink.footnotes" select="$print"/>
+ <xsl:param name="email.mailto.enabled">
+ <xsl:choose>
+ <xsl:when test="$print = 1">0</xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:param>
+
<!-- Property sets -->
<xsl:attribute-set name="chapter.title.properties">
<xsl:attribute name="font-size">24pt</xsl:attribute>
@@ -234,6 +253,12 @@
<xsl:attribute name="padding-bottom">0.5cm</xsl:attribute>
</xsl:attribute-set>
+ <xsl:attribute-set name="xref.properties">
+ <xsl:attribute name="color">
+ <xsl:value-of select="$link.color"/>
+ </xsl:attribute>
+ </xsl:attribute-set>
+
<!--
FO-SPECIFIC TEMPLATE CUSTOMIZATIONS
-->
@@ -332,7 +357,7 @@
</xsl:variable>
<fo:basic-link external-destination="url({$xhref})">
- <fo:inline color="blue">
+ <fo:inline color="{$link.color}">
<xsl:value-of select="concat(db:refentrytitle, '(', db:manvolnum, ')')"/>
</fo:inline>
</fo:basic-link>