Changeset af7b097 for stylesheets


Ignore:
Timestamp:
01/09/2005 06:25:29 AM (19 years ago)
Author:
Randy McMurchy <randy@…>
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, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
1a0f605
Parents:
6822b09
Message:

Updated to Manuel's newest PDF stylesheets; updated Glossary

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

Location:
stylesheets
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/blfs-pdf.xsl

    r6822b09 raf7b097  
    11<?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 -->
    52
    63<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    96
    107        <!-- We use FO and FOP as the processor -->
    11   <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/fo/docbook.xsl"/>
     8  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.67.2/fo/docbook.xsl"/>
    129  <xsl:param name="fop.extensions" select="1"/>
    1310  <xsl:param name="draft.mode" select="'no'"/>
    1411
    1512        <!-- Including our others customized templates -->
     13  <xsl:include href="pdf/lfs-admon.xsl"/>
    1614  <xsl:include href="pdf/lfs-index.xsl"/>
     15  <xsl:include href="pdf/lfs-mixed.xsl"/>
    1716  <xsl:include href="pdf/lfs-pagesetup.xsl"/>
     17  <xsl:include href="pdf/lfs-sections.xsl"/>
     18  <xsl:include href="pdf/lfs-xref.xsl"/>
     19
     20    <!-- This file contains our localization strings (for internationalization) -->
     21  <xsl:param name="local.l10n.xml" select="document('lfs-l10n.xml')"/>
    1822
    1923        <!-- Probably want to make the paper size configurable -->
    2024  <xsl:param name="paper.type" select="'letter'"/>
    2125
    22                 <!-- Don't hyphenate -->
     26    <!-- Printing Style -->
     27  <xsl:param name="double.sided" select="1"/>
    2328  <xsl:param name="hyphenate">false</xsl:param>
    24   <xsl:param name="alignment">left</xsl:param>
     29  <xsl:param name="alignment">justify</xsl:param>
    2530
    2631        <!-- Font size -->
    27   <xsl:param name="body.font.master">8</xsl:param>
    28   <xsl:param name="body.font.size">10pt</xsl:param>
    29 
    30         <!-- Graphics in admonitions -->
    31         <xsl:param name="admon.graphics" select="1"/>
    32 
    33                 <!-- Shade screen -->
    34         <xsl:param name="shade.verbatim" select="1"/>
     32  <xsl:param name="body.font.master">9</xsl:param>
     33  <xsl:param name="body.font.size">12pt</xsl:param>
    3534
    3635        <!-- TOC generation -->
     
    4443
    4544  <!-- Page number in Xref-->
    46   <xsl:param name="insert.xref.page.number">yes</xsl:param>
    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>
     45  <xsl:param name="insert.xref.page.number">no</xsl:param>
    5546
    5647  <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
  • stylesheets/pdf/lfs-index.xsl

    r6822b09 raf7b097  
    44<!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
    55<!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
    6 <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>
    76<!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
    8 <!ENTITY sep '" "'>
    97]>
    10 
    11 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    128
    139<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    1511                version="1.0">
    1612
    17         <!--Only one column to fit the table layout-->
    18   <xsl:param name="column.count.index" select="1"/>
    19 
    2013    <!--Title-->
    2114  <xsl:template match="index" mode="title.markup">
    22     <xsl:text>Index of packages and important installed files</xsl:text>
    23         </xsl:template>
     15    <xsl:param name="allow-anchors" select="0"/>
     16    <xsl:call-template name="gentext">
     17      <xsl:with-param name="key">Index</xsl:with-param>
     18    </xsl:call-template>
     19  </xsl:template>
    2420
    25         <!-- Divisions-->
     21    <!-- Divisions-->
    2622  <xsl:template match="indexterm" mode="index-div">
    2723    <xsl:param name="scope" select="."/>
     
    3733              <xsl:choose>
    3834                <xsl:when test="$divtitle = 'A'">
    39                   <xsl:text>Packages</xsl:text>
     35                  <xsl:call-template name="gentext">
     36                    <xsl:with-param name="key">Packages</xsl:with-param>
     37                  </xsl:call-template>
    4038                </xsl:when>
    4139                <xsl:when test="$divtitle = 'B'">
    42                     <xsl:text>Programs</xsl:text>
     40                  <xsl:call-template name="gentext">
     41                    <xsl:with-param name="key">Programs</xsl:with-param>
     42                  </xsl:call-template>
    4343                </xsl:when>
    4444                <xsl:when test="$divtitle = 'C'">
    45                     <xsl:text>Libraries</xsl:text>
     45                  <xsl:call-template name="gentext">
     46                    <xsl:with-param name="key">Libraries</xsl:with-param>
     47                  </xsl:call-template>
    4648                </xsl:when>
    4749                <xsl:when test="$divtitle = 'D'">
    48                     <xsl:text>Scripts</xsl:text>
     50                  <xsl:call-template name="gentext">
     51                    <xsl:with-param name="key">Scripts</xsl:with-param>
     52                  </xsl:call-template>
    4953                </xsl:when>
    5054                <xsl:when test="$divtitle = 'E'">
    51                     <xsl:text>Configuration Files</xsl:text>
     55                  <xsl:call-template name="gentext">
     56                    <xsl:with-param name="key">Configuration Files</xsl:with-param>
     57                  </xsl:call-template>
    5258                </xsl:when>
    5359                <xsl:when test="$divtitle = 'F'">
    54                   <xsl:text>Bootscripts</xsl:text>
     60                  <xsl:call-template name="gentext">
     61                    <xsl:with-param name="key">Bootscripts</xsl:with-param>
     62                  </xsl:call-template>
    5563                </xsl:when>
    5664                <xsl:when test="$divtitle = 'G'">
    57                     <xsl:text>Others</xsl:text>
     65                  <xsl:call-template name="gentext">
     66                    <xsl:with-param name="key">Others</xsl:with-param>
     67                  </xsl:call-template>
    5868                </xsl:when>
    5969                <xsl:otherwise>
    6070                  <xsl:value-of select="$divtitle"/>
    6171                </xsl:otherwise>
    62                 </xsl:choose>
     72              </xsl:choose>
    6373            </xsl:with-param>
    6474          </xsl:call-template>
    6575        </xsl:if>
    66         <fo:table table-layout="fixed" width="100%">
    67                 <fo:table-column column-number="1" column-width="11em"/>
    68                 <fo:table-column column-number="2" column-width="19em"/>
    69                 <fo:table-column column-number="3"/>
    70           <fo:table-body>
    71             <xsl:apply-templates select="key('letter', $key)[&scope;]
    72                                         [count(.|key('primary', &primary;)[&scope;][1])=1]"
    73                                 mode="index-primary">
    74               <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
    75               <xsl:with-param name="scope" select="$scope"/>
    76             </xsl:apply-templates>
    77                 </fo:table-body>
    78         </fo:table>
     76        <fo:block>
     77          <xsl:apply-templates select="key('letter', $key)[&scope;]
     78                                      [count(.|key('primary', &primary;)[&scope;][1])=1]"
     79                              mode="index-primary">
     80            <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
     81            <xsl:with-param name="scope" select="$scope"/>
     82          </xsl:apply-templates>
     83        </fo:block>
    7984      </fo:block>
    8085    </xsl:if>
    8186  </xsl:template>
    8287
    83         <!-- Dropping the separator from here -->
     88    <!-- The separator -->
    8489  <xsl:template match="indexterm" mode="reference">
    8590    <xsl:param name="scope" select="."/>
    86         <xsl:call-template name="reference">
     91    <xsl:text>:   </xsl:text>
     92      <xsl:call-template name="reference">
    8793        <xsl:with-param name="zones" select="normalize-space(@zone)"/>
    8894        <xsl:with-param name="scope" select="$scope"/>
    8995      </xsl:call-template>
    9096  </xsl:template>
    91 
    92         <!-- Changing the output tags and re-addind the separator-->
    93   <xsl:template match="indexterm" mode="index-primary">
    94     <xsl:param name="scope" select="."/>
    95     <xsl:variable name="key" select="&primary;"/>
    96     <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
    97     <fo:table-row>
    98         <fo:table-cell>
    99         <fo:block>
    100           <xsl:value-of select="primary"/>
    101           <xsl:text>: </xsl:text>
    102                                 </fo:block>
    103       </fo:table-cell>
    104       <xsl:for-each select="$refs[not(see) and not(seealso)
    105                             and not(secondary)]">
    106         <xsl:apply-templates select="." mode="reference">
    107           <xsl:with-param name="scope" select="$scope"/>
    108         </xsl:apply-templates>
    109       </xsl:for-each>
    110                 </fo:table-row>
    111                 <xsl:if test="$refs/secondary">
    112       <xsl:apply-templates select="$refs[secondary and count(.|key('secondary',
    113                                 concat($key, &sep;, &secondary;))[&scope;][1]) = 1]" mode="index-secondary">
    114                                 <xsl:with-param name="scope" select="$scope"/>
    115                                 <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/>
    116                         </xsl:apply-templates>
    117                 </xsl:if>
    118   </xsl:template>
    119 
    120   <xsl:template match="indexterm" mode="index-secondary">
    121     <xsl:param name="scope" select="."/>
    122                 <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
    123     <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
    124     <fo:table-row>
    125         <fo:table-cell>
    126                     <fo:block start-indent="1pc">
    127           <xsl:value-of select="secondary"/>
    128           <xsl:text>: </xsl:text>
    129         </fo:block>
    130         </fo:table-cell>
    131       <xsl:for-each select="$refs[not(see) and not(seealso) and not(tertiary)]">
    132         <xsl:apply-templates select="." mode="reference">
    133           <xsl:with-param name="scope" select="$scope"/>
    134         </xsl:apply-templates>
    135       </xsl:for-each>
    136                 </fo:table-row>
    137   </xsl:template>
    13897 
    139         <!-- Targets titles and bookmarks-->
     98    <!--Bookmarks-->
    14099  <xsl:template name="reference">
    141100    <xsl:param name="scope" select="."/>
     
    157116          </xsl:call-template>
    158117        </xsl:variable>
    159         <fo:table-cell>
    160                 <fo:block>
    161             <fo:basic-link internal-destination="{$id}">
    162               <xsl:value-of select="$target/title"/>
    163               <xsl:apply-templates select="$target" mode="page.citation">
    164                 <xsl:with-param name="id" select="$id"/>
    165               </xsl:apply-templates>
    166             </fo:basic-link>
    167                 </fo:block>
    168                                 </fo:table-cell>
    169         <fo:table-cell>
    170                 <fo:block>
    171             <fo:basic-link internal-destination="{$id2}">
    172               <xsl:text>description</xsl:text>
    173               <xsl:apply-templates select="$target2" mode="page.citation">
    174                 <xsl:with-param name="id" select="$id2"/>
    175               </xsl:apply-templates>
    176             </fo:basic-link>
    177                 </fo:block>
    178                                 </fo:table-cell>
     118        <fo:basic-link internal-destination="{$id}">
     119          <xsl:apply-templates select="$target" mode="page.citation">
     120            <xsl:with-param name="id" select="$id"/>
     121          </xsl:apply-templates>
     122        </fo:basic-link>
     123          <xsl:text> ,  </xsl:text>
     124        <fo:basic-link internal-destination="{$id2}">
     125          <xsl:apply-templates select="$target2" mode="page.citation">
     126            <xsl:with-param name="id" select="$id2"/>
     127          </xsl:apply-templates>
     128        </fo:basic-link>
    179129      </xsl:when>
    180130      <xsl:otherwise>
     
    186136          </xsl:call-template>
    187137        </xsl:variable>
    188         <fo:table-cell>
    189                 <fo:block>
    190             <fo:basic-link internal-destination="{$id}">
    191               <xsl:value-of select="$target/title"/>
    192               <xsl:apply-templates select="$target" mode="page.citation">
    193                 <xsl:with-param name="id" select="$id"/>
    194               </xsl:apply-templates>
    195             </fo:basic-link>
    196                 </fo:block>
    197                                 </fo:table-cell>
     138        <fo:basic-link internal-destination="{$id}">
     139          <xsl:apply-templates select="$target" mode="page.citation">
     140            <xsl:with-param name="id" select="$id"/>
     141          </xsl:apply-templates>
     142        </fo:basic-link>
    198143      </xsl:otherwise>
    199144    </xsl:choose>
    200145  </xsl:template>
    201146
     147    <!-- Page number in Index-->
     148  <xsl:template match="*" mode="page.citation">
     149    <xsl:param name="id" select="'???'"/>
     150    <fo:inline keep-together.within-line="always">
     151      <!--<xsl:text>[p</xsl:text>-->
     152      <fo:page-number-citation ref-id="{$id}"/>
     153      <!--<xsl:text>]</xsl:text>-->
     154    </fo:inline>
     155  </xsl:template>
     156
    202157</xsl:stylesheet>
  • stylesheets/pdf/lfs-mixed.xsl

    r6822b09 raf7b097  
    3333
    3434    <!-- Show URLs in italic font -->
    35   <xsl:template match="ulink" name="ulink">
     35  <!--<xsl:template match="ulink" name="ulink">
    3636    <fo:inline font-style="italic">
    3737      <fo:basic-link xsl:use-attribute-sets="xref.properties">
     
    5555    <xsl:if test="count(child::node()) != 0
    5656                  and string(.) != @url
    57                   and $ulink.show != 0">
     57                  and $ulink.show != 0">-->
    5858      <!-- yes, show the URI -->
    59       <xsl:choose>
     59    <!--  <xsl:choose>
    6060        <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
    6161          <xsl:text>&#xA0;</xsl:text>
     
    8585      </xsl:choose>
    8686    </xsl:if>
    87   </xsl:template>
     87  </xsl:template>-->
    8888
    8989    <!-- Split URLs (obsolete, keeped as reference) -->
  • stylesheets/pdf/lfs-pagesetup.xsl

    r6822b09 raf7b097  
    1515        </xsl:choose>
    1616      </xsl:attribute>
    17       <xsl:value-of select="/book/bookinfo/title"/>
    18       <xsl:text> - </xsl:text>
     17      <xsl:text>Beyond Linux From Scratch - </xsl:text>
    1918      <xsl:value-of select="/book/bookinfo/subtitle"/>
    2019    </fo:block>
  • stylesheets/pdf/lfs-sections.xsl

    r6822b09 raf7b097  
    2020
    2121    <!-- Sections numbering -->
    22   <xsl:param name="section.autolabel" select="1"/>
    23   <xsl:param name="section.label.includes.component.label" select="1"/>
     22  <xsl:param name="section.autolabel" select="0"/>
     23  <xsl:param name="section.label.includes.component.label" select="0"/>
    2424
    2525    <!-- Skip numeraration for sections with empty title -->
Note: See TracChangeset for help on using the changeset viewer.