Changeset 5d4975d for stylesheets/blfs-pdf.xsl
- Timestamp:
- 05/08/2004 02:42:12 AM (20 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, v5_1, v5_1-pre1, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 98b068f
- Parents:
- 64f2cb5d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/blfs-pdf.xsl
r64f2cb5d r5d4975d 1 <?xml version='1.0'?> 1 <?xml version='1.0' encoding='ISO-8859-1'?> 2 3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> 4 Based on the original lfs-pdf.xsl created by Matthew Burgess --> 5 2 6 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3 7 xmlns:fo="http://www.w3.org/1999/XSL/Format" 4 xmlns="http://www.w3.org/1999/xhtml"5 8 version="1.0"> 6 9 7 <!-- We use FO and FOP as the processor -->8 <xsl:import href="http://docbook.sourceforge.net/release/xsl/ current/fo/docbook.xsl"/>10 <!-- We use FO and FOP as the processor --> 11 <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/> 9 12 <xsl:param name="fop.extensions" select="1"/> 10 13 <xsl:param name="draft.mode" select="'no'"/> 11 <!-- Probably want to make the paper size configurable -->12 <xsl:param name="paper.type" select="'Letter'"/>13 14 15 <!-- Including our others customized templates --> 16 <xsl:include href="pdf/lfs-index.xsl"/> 17 <xsl:include href="pdf/lfs-pagesetup.xsl"/> 14 18 15 <!-- Font size --> 19 <!-- Probably want to make the paper size configurable --> 20 <xsl:param name="paper.type" select="'letter'"/> 21 22 <!-- Don't hyphenate --> 23 <xsl:param name="hyphenate">false</xsl:param> 24 <xsl:param name="alignment">left</xsl:param> 25 26 <!-- Font size --> 16 27 <xsl:param name="body.font.master">8</xsl:param> 17 28 <xsl:param name="body.font.size">10pt</xsl:param> 18 29 19 <!-- Margins --> 20 <xsl:param name="page.margin.inner">1in</xsl:param> 21 <xsl:param name="page.margin.outer">0.5in</xsl:param> 22 <xsl:param name="title.margin.left">-1pc</xsl:param> 30 <!-- Graphics in admonitions --> 31 <xsl:param name="admon.graphics" select="1"/> 23 32 24 <!-- TOC stuff --> 33 <!-- Shade screen --> 34 <xsl:param name="shade.verbatim" select="1"/> 35 36 <!-- TOC generation --> 25 37 <xsl:param name="generate.toc"> 26 38 book toc … … 28 40 </xsl:param> 29 41 <xsl:param name="toc.section.depth">1</xsl:param> 30 <xsl:param name="generate.section.toc.level" select="-1"></xsl:param> 31 <xsl:param name="toc.indent.width" select="18"></xsl:param> 32 33 <!-- Force section1's onto a new page --> 34 <xsl:attribute-set name="section.level1.properties"> 35 <xsl:attribute name="break-after">page</xsl:attribute> 36 </xsl:attribute-set> 37 38 <!-- Columns in appendix --> 39 <xsl:param name="column.count.back" select="2"/> 40 41 <!-- Don't hyphenate --> 42 <xsl:param name="hyphenate">false</xsl:param> 43 <xsl:param name="alignment">left</xsl:param> 42 <xsl:param name="generate.section.toc.level" select="-1"/> 43 <xsl:param name="toc.indent.width" select="18"/> 44 44 45 45 <!-- Page number in Xref--> 46 46 <xsl:param name="insert.xref.page.number">yes</xsl:param> 47 <xsl:template match="xref" name="xref"> 48 <xsl:variable name="targets" select="key('id',@linkend)"/> 49 <xsl:variable name="target" select="$targets[1]"/> 50 <xsl:variable name="refelem" select="local-name($target)"/> 51 <xsl:call-template name="check.id.unique"> 52 <xsl:with-param name="linkend" select="@linkend"/> 53 </xsl:call-template> 54 <xsl:choose> 55 <xsl:when test="$refelem=''"> 56 <xsl:message> 57 <xsl:text>XRef to nonexistent id: </xsl:text> 58 <xsl:value-of select="@linkend"/> 59 </xsl:message> 60 <xsl:text>???</xsl:text> 61 </xsl:when> 62 <xsl:when test="@endterm"> 63 <fo:basic-link internal-destination="{@linkend}" 64 xsl:use-attribute-sets="xref.properties"> 65 <xsl:variable name="etargets" select="key('id',@endterm)"/> 66 <xsl:variable name="etarget" select="$etargets[1]"/> 67 <xsl:choose> 68 <xsl:when test="count($etarget) = 0"> 69 <xsl:message> 70 <xsl:value-of select="count($etargets)"/> 71 <xsl:text>Endterm points to nonexistent ID: </xsl:text> 72 <xsl:value-of select="@endterm"/> 73 </xsl:message> 74 <xsl:text>???</xsl:text> 75 </xsl:when> 76 <xsl:otherwise> 77 <xsl:apply-templates select="$etarget" mode="endterm"/> 78 </xsl:otherwise> 79 </xsl:choose> 80 </fo:basic-link> 81 </xsl:when> 82 <xsl:when test="$target/@xreflabel"> 83 <fo:basic-link internal-destination="{@linkend}" 84 xsl:use-attribute-sets="xref.properties"> 85 <xsl:call-template name="xref.xreflabel"> 86 <xsl:with-param name="target" select="$target"/> 87 </xsl:call-template> 88 </fo:basic-link> 89 </xsl:when> 90 <xsl:otherwise> 91 <fo:basic-link internal-destination="{@linkend}" 92 xsl:use-attribute-sets="xref.properties"> 93 <xsl:apply-templates select="$target" mode="xref-to"> 94 <xsl:with-param name="referrer" select="."/> 95 <xsl:with-param name="xrefstyle"> 96 <xsl:choose> 97 <xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0"> 98 <xsl:value-of select="@role"/> 99 </xsl:when> 100 <xsl:otherwise> 101 <xsl:value-of select="@xrefstyle"/> 102 </xsl:otherwise> 103 </xsl:choose> 104 </xsl:with-param> 105 </xsl:apply-templates> 106 </fo:basic-link> 107 </xsl:otherwise> 108 </xsl:choose> 109 <xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != '' 110 and (contains(@xrefstyle, 'page') 111 or contains(@xrefstyle, 'Page'))) 112 and ( $insert.xref.page.number = 'yes' 113 or $insert.xref.page.number = '1') 114 or local-name($target) = 'para'"> 115 <fo:basic-link internal-destination="{@linkend}" 116 xsl:use-attribute-sets="xref.properties"> 117 <xsl:text>, p. </xsl:text> 118 <xsl:apply-templates select="$target" mode="page.citation"> 119 <xsl:with-param name="id" select="@linkend"/> 120 </xsl:apply-templates> 121 </fo:basic-link> 122 </xsl:if> 123 </xsl:template> 47 <xsl:template match="*" mode="page.citation"> 48 <xsl:param name="id" select="'???'"/> 49 <fo:inline keep-together.within-line="always"> 50 <xsl:text>[p.</xsl:text> 51 <fo:page-number-citation ref-id="{$id}"/> 52 <xsl:text>]</xsl:text> 53 </fo:inline> 54 </xsl:template> 124 55 125 56 <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
Note:
See TracChangeset
for help on using the changeset viewer.