Ported from testing the last changes in PDF stylesheets

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4042 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Manuel Canales Esparcia 2004-08-18 16:54:30 +00:00
parent 665e07b8fc
commit de749cf1cf
3 changed files with 63 additions and 19 deletions

View File

@ -25,8 +25,8 @@
<xsl:param name="alignment">justify</xsl:param> <xsl:param name="alignment">justify</xsl:param>
<!-- Font size --> <!-- Font size -->
<xsl:param name="body.font.master">6</xsl:param> <xsl:param name="body.font.master">10</xsl:param>
<xsl:param name="body.font.size">8pt</xsl:param> <xsl:param name="body.font.size">12pt</xsl:param>
<!-- TOC stuff --> <!-- TOC stuff -->
<xsl:param name="generate.toc"> <xsl:param name="generate.toc">

View File

@ -4,6 +4,50 @@
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0"> version="1.0">
<!-- Split URLs -->
<xsl:template name="hyphenate-url">
<xsl:param name="url" select="''"/>
<xsl:choose>
<xsl:when test="ancestor::varlistentry">
<xsl:choose>
<xsl:when test="string-length($url) > 88">
<xsl:value-of select="substring($url, 1, 50)"/>
<xsl:param name="rest" select="substring($url, 51)"/>
<xsl:value-of select="substring-before($rest, '/')"/>
<xsl:text> /</xsl:text>
<xsl:value-of select="substring-after($rest, '/')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-before($url, '//')"/>
<xsl:text>// </xsl:text>
<xsl:call-template name="split-url">
<xsl:with-param name="url2" select="substring-after($url, '//')"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="split-url">
<xsl:choose>
<xsl:when test="contains($url2, '/')">
<xsl:param name="url2" select="''"/>
<xsl:value-of select="substring-before($url2, '/')"/>
<xsl:text> /</xsl:text>
<xsl:call-template name="split-url">
<xsl:with-param name="url2" select="substring-after($url2, '/')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$url2"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Shade screen --> <!-- Shade screen -->
<xsl:param name="shade.verbatim" select="1"/> <xsl:param name="shade.verbatim" select="1"/>
@ -45,7 +89,7 @@
<!-- Admonitions text properties --> <!-- Admonitions text properties -->
<xsl:attribute-set name="admonition.properties"> <xsl:attribute-set name="admonition.properties">
<xsl:attribute name="margin-right">12pt</xsl:attribute> <xsl:attribute name="margin-right">6pt</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<!-- Adding left space to the graphics and color to the titles --> <!-- Adding left space to the graphics and color to the titles -->

View File

@ -65,19 +65,19 @@
<!-- Margins --> <!-- Margins -->
<xsl:param name="page.margin.inner">0.5in</xsl:param> <xsl:param name="page.margin.inner">0.5in</xsl:param>
<xsl:param name="page.margin.outer">0.375in</xsl:param> <xsl:param name="page.margin.outer">0.375in</xsl:param>
<xsl:param name="title.margin.left">-1pc</xsl:param> <xsl:param name="title.margin.left">-0.7pc</xsl:param>
<xsl:attribute-set name="normal.para.spacing"> <xsl:attribute-set name="normal.para.spacing">
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
<xsl:attribute name="space-before.maximum">1em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<xsl:attribute-set name="list.block.spacing"> <xsl:attribute-set name="list.block.spacing">
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
<xsl:attribute name="space-before.maximum">1em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
<xsl:attribute name="space-after.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
<xsl:attribute name="space-after.minimum">0.6em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
<xsl:attribute name="space-after.maximum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<xsl:attribute-set name="list.item.spacing"> <xsl:attribute-set name="list.item.spacing">
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute> <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
@ -85,12 +85,12 @@
<xsl:attribute name="space-before.maximum">0.8em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<xsl:attribute-set name="verbatim.properties"> <xsl:attribute-set name="verbatim.properties">
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute> <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
<xsl:attribute name="space-before.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
<xsl:attribute name="space-before.maximum">1em</xsl:attribute> <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
<xsl:attribute name="space-after.minimum">0.6em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
<xsl:attribute name="space-after.optimum">0.8em</xsl:attribute> <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
<xsl:attribute name="space-after.maximum">1em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
</xsl:attribute-set> </xsl:attribute-set>
<!-- Others--> <!-- Others-->