Ignore:
Timestamp:
05/08/2004 02:42:12 AM (20 years ago)
Author:
Larry Lawrence <larry@…>
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
Message:

updated stylesheets to 0.9

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2121 af4574ff-66df-0310-9fd7-8a98e5e911e0

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>
     4Based on the original lfs-pdf.xsl created by Matthew Burgess -->
     5
    26<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    37                xmlns:fo="http://www.w3.org/1999/XSL/Format"
    4                 xmlns="http://www.w3.org/1999/xhtml"
    58                version="1.0">
    69
    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"/>
    912  <xsl:param name="fop.extensions" select="1"/>
    1013  <xsl:param name="draft.mode" select="'no'"/>
    11   <!-- Probably want to make the paper size configurable -->
    12   <xsl:param name="paper.type" select="'Letter'"/>
    1314
     15        <!-- Including our others customized templates -->
     16  <xsl:include href="pdf/lfs-index.xsl"/>
     17  <xsl:include href="pdf/lfs-pagesetup.xsl"/>
    1418
    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 -->
    1627  <xsl:param name="body.font.master">8</xsl:param>
    1728  <xsl:param name="body.font.size">10pt</xsl:param>
    1829
    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"/>
    2332
    24   <!-- TOC stuff -->
     33                <!-- Shade screen -->
     34        <xsl:param name="shade.verbatim" select="1"/>
     35
     36        <!-- TOC generation -->
    2537  <xsl:param name="generate.toc">
    2638    book      toc
     
    2840  </xsl:param>
    2941  <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"/>
    4444
    4545  <!-- Page number in Xref-->
    4646  <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>
    12455
    12556  <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
Note: See TracChangeset for help on using the changeset viewer.