Changeset 3fe8b511 for stylesheets


Ignore:
Timestamp:
01/07/2005 05:14:15 AM (19 years ago)
Author:
Bruce Dubbs <bdubbs@…>
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:
d8dc77a
Parents:
bad8b53
Message:

Update stylesheets and fix Python references

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

Location:
stylesheets
Files:
10 added
12 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/blfs-chunked.xsl

    rbad8b53 r3fe8b511  
    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-chunked.xsl created by Matthew Burgess -->
    52
    63<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    85                version="1.0">
    96
    10         <!-- We use XHTML -->
    11   <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.65.1/xhtml/chunk.xsl"/>
    12   <xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>
     7  <xsl:import href="blfs-chunked1.xsl"/>
     8
     9    <!-- Handle name and date in info section as a footnote -->
     10
     11  <xsl:template name="process.footnotes">
     12    <xsl:variable name="footnotes" select=".//footnote"/>
     13    <xsl:variable name="fcount">
     14      <xsl:call-template name="count.footnotes.in.this.chunk">
     15        <xsl:with-param name="node" select="."/>
     16        <xsl:with-param name="footnotes" select="$footnotes"/>
     17      </xsl:call-template>
     18    </xsl:variable>
     19   
     20    <!-- Only bother to do this if there's at least one non-table footnote -->
     21    <xsl:if test="$fcount &gt; 0">
     22      <div class="footnotes">
     23        <br/>
     24        <hr width="100" align="left"/>
     25        <xsl:call-template name="process.footnotes.in.this.chunk">
     26          <xsl:with-param name="node" select="."/>
     27          <xsl:with-param name="footnotes" select="$footnotes"/>
     28        </xsl:call-template>
     29      </div>
     30    </xsl:if>
    1331 
    14         <!-- Including our others customized templates -->
    15   <xsl:include href="xhtml/lfs-admon.xsl"/>
    16   <xsl:include href="xhtml/lfs-index.xsl"/>
    17   <xsl:include href="xhtml/lfs-legalnotice.xsl"/>
    18   <xsl:include href="xhtml/lfs-mixed.xsl"/>
    19   <xsl:include href="xhtml/lfs-navigational.xsl"/>
    20   <xsl:include href="xhtml/lfs-titles.xsl"/>
    21   <xsl:include href="xhtml/lfs-toc.xsl"/>
     32    <!-- Add this to the footnotes -->
     33    <xsl:apply-templates select='prefaceinfo|chapterinfo|sect1info' mode='attribution'/>
     34  </xsl:template>
    2235
    23         <!-- The CSS Stylesheet -->
    24   <xsl:param name="html.stylesheet" select="'../stylesheets/blfs.css'"/>
     36  <xsl:template match='prefaceinfo|chapterinfo|sect1info' mode='attribution'>
     37    <p class='updated'> Last updated <!-- by
     38      <xsl:apply-templates select="othername" mode='attribution'/> -->
     39      on
     40      <xsl:apply-templates select="date" mode='attribution'/>
     41    </p>
     42  </xsl:template>
    2543
    26         <!-- Dropping some unwanted style attributes -->
    27   <xsl:param name="ulink.target" select="''"></xsl:param>
    28   <xsl:param name="css.decoration" select="0"></xsl:param>
    29  
    30     <!-- No XML declaration -->
    31   <xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>
    32  
    33     <!-- Insert a stylesheet for printing -->
    34   <xsl:template name='user.head.content'>
    35      <link rel='stylesheet' href="../stylesheets/blfs-print.css" type="text/css" media='print'/>
     44  <xsl:template match='othername' mode='attribution'>
     45     <xsl:variable name='author'>
     46          <xsl:value-of select='.'/>
     47     </xsl:variable>
     48     <xsl:variable name='nameonly'>
     49          <xsl:value-of select='substring($author,16)'/>
     50     </xsl:variable>
     51     <xsl:value-of select="substring-before($nameonly,'$')" />
    3652  </xsl:template>
    3753
    38 <xsl:template match="userinput">
    39   <xsl:call-template name="inline.monoseq"/>
    40 </xsl:template>
     54  <xsl:template match='date' mode='attribution'>
     55      <xsl:variable name='date'>
     56         <xsl:value-of select='.'/>
     57      </xsl:variable>
     58      <xsl:value-of select="substring($date,7,26)" />
     59  </xsl:template>
    4160
    4261</xsl:stylesheet>
  • stylesheets/blfs-print.xsl

    rbad8b53 r3fe8b511  
    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 
    6 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    7                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
    8                 version="1.0">
    9 
    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"/>
    12   <xsl:param name="fop.extensions" select="1"/>
    13   <xsl:param name="draft.mode" select="'no'"/>
    14 
    15         <!-- Including our others customized templates -->
    16   <xsl:include href="print/lfs-index.xsl"/>
    17   <xsl:include href="print/lfs-pagesetup.xsl"/>
    18 
    19         <!-- Probably want to make the paper size configurable -->
    20   <xsl:param name="paper.type" select="'letter'"/>
    21 
    22         <!-- Printing Style -->
    23   <xsl:param name="double.sided" select="1"/>
    24   <xsl:param name="hyphenate">true</xsl:param>
    25   <xsl:param name="alignment">justify</xsl:param>
    26  
    27         <!-- Hyphenate links -->
    28   <xsl:param name="ulink.hyphenate" select="' '"></xsl:param>
    29 
    30         <!-- Font size -->
    31   <xsl:param name="body.font.master">8</xsl:param>
    32   <xsl:param name="body.font.size">10pt</xsl:param>
    33 
    34         <!-- TOC stuff -->
    35   <xsl:param name="generate.toc">
    36     book      toc
    37     part      nop
    38   </xsl:param>
    39   <xsl:param name="toc.section.depth">1</xsl:param>
    40   <xsl:param name="generate.section.toc.level" select="-1"></xsl:param>
    41   <xsl:param name="toc.indent.width" select="18"></xsl:param>
    42 
    43         <!-- Page number in Xref-->
    44   <xsl:param name="insert.xref.page.number">yes</xsl:param>
    45         <xsl:template match="*" mode="page.citation">
    46         <xsl:param name="id" select="'???'"/>
    47         <fo:inline keep-together.within-line="always">
    48                 <xsl:text>[p</xsl:text>
    49       <fo:page-number-citation ref-id="{$id}"/>
    50                 <xsl:text>]</xsl:text>
    51         </fo:inline>
    52         </xsl:template>
    53 
    54         <!-- Prevent duplicate e-mails in the Acknowledgments pages-->
    55   <xsl:param name="ulink.show" select="0"/>
    56 
    57 </xsl:stylesheet>
  • stylesheets/blfs.css

    rbad8b53 r3fe8b511  
     1/* Global settings */
    12body {
    2   font-weight: normal;
    3   font-size: medium;
    43  font-family: verdana, tahoma, helvetica, arial, sans-serif;
    54  text-align: left;
    6 }
    7 
    8 .toc ul, .index ul {
    9         list-style: none;
    10 }
    11 
    12 .navheader {
    13   font-size: smaller;
     5  background: #fff;
     6  color: #333;
     7  margin: 1em;
     8  padding: 0;
     9  font-size: 1em;
     10  line-height: 1.2em
     11}
     12
     13a:link { color: #22b; }
     14a:visited { color: #7e4988; }
     15a:hover, a:focus { color: #d30e08; }
     16a:active { color: #6b77b1;}
     17
     18/* Headers */
     19h1, h2, b, strong {
     20  color: #000;
     21  font-weight: bold;
     22}
     23
     24h3, h4, h5, h6 {
     25  color: #222;
     26}
     27
     28strong {
     29  color: #55f;  /* Light Blue */
     30}
     31
     32h1 { font-size: 173%; text-align: center; }
     33h2 { font-size: 144%; padding-top: 0.2em; margin-top: 0.3em; }
     34h2.subtitle { text-align: center; }
     35h3 { font-size: 120%; }
     36h4 { font-size: 110%;}
     37h5, h6 { font-size: 110%; font-style: italic; }
     38
     39/* Navigation */
     40div.headertitles h4 {
     41  margin-bottom: 2px;
    1442  text-align: center;
    15   padding-bottom: 0.5em;
    16   border-bottom: solid 2px #080;
    17 }
    18 
    19 .navheader p {
    20   margin: 1em 0em;
    21 }
    22 
    23 .navfooter {
    24   font-size: smaller;
     43}
     44
     45div.headertitles h3 {
     46  margin-top: 2px;
    2547  text-align: center;
    26   padding-top: 0.5em;
    27   border-top: solid 2px #080;
    28 }
    29 
    30 div.sect3 li {
    31   /* padding: 0em; */
     48}
     49
     50div.navheader, div.navfooter {
     51  background: #ecedef;
     52  padding: 0.1em 1em;
     53  border-bottom: 1px solid #dbddec;
     54}
     55
     56div.navfooter {
     57  border-bottom: 0;
     58  border-top: 1px solid #dbddec;
     59}
     60
     61div.navheader ul, div.navfooter ul {
     62  padding: .2em .5em .5em 0;
     63  margin-left: 0px;
     64  margin-right: 2px;
     65  position: relative;
     66  background: #dbddec;
     67}
     68
     69div.navheader ul li, div.navfooter ul li {
     70  display: inline;
     71  width: 40%;
     72}
     73
     74div.navheader ul li.prev, div.navfooter ul li.prev {
     75  position: absolute;
     76  display: block;
     77  left: 0;
     78  text-align: left;
     79  padding: 0.2em 1em;
     80  margin-left: 6px;
     81}
     82
     83div.navheader ul li.next, div.navfooter ul li.next {
     84  position: absolute;
     85  display: block;
     86  text-align: right;
     87  right: 5px;
     88  padding: 0.2em 0.5em;
     89  margin-right: 7px;
     90}
     91
     92div.navheader ul li.prev p, div.navfooter ul li.prev p,
     93div.navheader ul li.next p, div.navfooter ul li.next p {
     94  padding: 0;
     95  margin: 1px 0px;
     96}
     97
     98div.navheader ul li.home, div.navheader ul li.up,
     99div.navfooter ul li.home, div.navfooter ul li.up {
     100  text-align: center;
     101  padding: 0;
     102  margin: 0px auto;
     103  display: block;
     104  color: #dbddec;
     105}
     106
     107/* TOC & Index*/
     108
     109div.toc ul, div.index ul, div.navheader ul, div.navfooter ul {
     110  list-style: none;
     111}
     112
     113div.toc, div.dedication {
     114  padding-left: 1em;
     115}
     116
     117li.preface {
     118  margin-left: 1em;
     119}
     120
     121div.toc ul li h3, div.toc ul li h4 {
     122  margin: .4em;
     123}
     124
     125.item {
     126    width: 17em;
     127    float: left;
     128}
     129
     130.secitem {
     131    font-weight: normal;
     132    width: 16em;
     133    float: left;
     134}
     135
     136/* Admonitions */
     137div.note, div.tip {
     138  background-color: #fffff6;
     139  border: 2px solid #dbddec;
     140  width: 90%;
     141  margin: .5em auto;
     142}
     143
     144div.important, div.warning, div.caution {
     145  background-color: #fffff6;
     146  border: medium solid #400;
     147  width: 90%;
     148  margin: 1.5em auto;
     149  color: #600;
     150  font-size: larger;
     151}
     152
     153div.important h3, div.warning h3, div.caution h3 {
     154  color: #900;
     155}
     156
     157div.admonhead img {
     158  padding: .3em;
     159}
     160
     161div.admonhead h3 {
     162  display: inline;
     163  margin-left: 1.5em;
     164}
     165
     166div.admonbody {
     167  margin: .5em;
     168}
     169
     170div.important em, div.warning em, div.caution em {
     171  color: #000;
     172  font-weight: bold;
     173}
     174
     175div.important tt, div.warning tt, div.caution tt {
     176  font-weight: bold;
     177}
     178
     179/* variablelist & segmentedlist */
     180dl {
     181  margin: 0;
     182  padding: 0;
     183}
     184
     185dt {
     186  display: list-item;
     187  font-weight: bold;
     188  margin: .33em 0 0 1em;
     189  padding: 0;
     190}
     191
     192div.content dt {
     193  list-style: none;
     194}
     195
     196dd  {
     197  margin: 0 0 1em 3em;
     198  padding: 0;
     199}
     200
     201div.variablelist dd {
     202  margin-bottom: 1em;
     203}
     204
     205div.variablelist dd p {
     206  margin-top: 0px;
     207}
     208
     209dl.materials dd {
     210  margin-left: 0px;
     211}
     212
     213div.segmentedlist {
     214  margin-top: 1em;
     215}
     216
     217div.segmentedlist p {
     218  margin: 0px auto;
     219}
     220
     221/* itemizedlist */
     222
     223div.itemizedlist {
     224  margin-left: 1em;
    32225}
    33226
     
    38231}
    39232
    40 .prev {
    41   width: 40%;
    42   float: left;
    43   text-align: left;
     233/* Indented blocks */
     234p, ul, dl, code, blockquote {
    44235  padding-left: 1em;
    45236}
    46237
    47 .next {
    48   width: 40%;
    49   float: right;
    50   text-align: right;
    51   padding-right: 1em;
    52 }
    53 
    54 p, h1, h2, h3, h4, h5, h6 {
    55   margin: 0.5em 0em;
    56 }
    57 
    58 h4 {
    59   font-size: 90%;
    60   padding-left: 0em;
    61 }
    62 
    63 
    64 div.navheader ul li, div.navfooter ul li {
    65         display: inline;
    66   padding: 4em;
    67 }
    68 
    69 li.preface {
    70         margin-left: 2.5em;
    71 }
    72 
    73 div.book div.titlepage h1.title {
    74     font-weight: bold;
    75     font-size: xx-large;
    76     text-align: center;
    77 }
    78 
    79 div.book div.titlepage h2.subtitle {
    80     font-weight: bold;
    81     font-size: x-large;
    82     text-align: center;
    83 }
    84 
    85 div.book div.titlepage h3.author {
    86     font-size: large;
    87 }
    88 
    89 div.book div.dedication div.titlepage h2.title {
    90     font-weight: normal;
    91     font-size: x-large;
    92 }
    93 
    94 div.chapter div.titlepage h2.title {
    95     font-weight: bold;
    96     font-size: x-large;
    97     text-align: left;
    98 }
    99 
    100 div.sect1 div.titlepage h2.title {
    101     font-weight: bold;
    102     font-size: x-large;
    103     text-align: left;
    104 }
    105 
    106 div.appendix  p.title {
    107     font-weight: bold;
    108     font-size: large;
    109     text-align: center;
    110 }
    111 
    112 
    113 tt {
    114     font-family: courier, monospace;
    115     font-size: 110%;
     238/* Monospaced elements */
     239tt, code, kbd, pre, .command {
     240  font-family: monospace;
     241}
     242
     243pre.userinput {
     244  color: #101310;
     245  background-color: #e5e5e5;
     246  border: 1px solid #050505;
     247  padding: .5em 1em;
     248  margin: 0 2em;
     249}
     250
     251.literal {
     252  font-weight: normal;
    116253}
    117254
    118255pre.screen {
    119     color: black;
    120     background-color: #dddddd;
    121     font-family: Courier, monospace;
    122         font-size: 13px;
    123 }
    124 
    125 pre.screen {
    126   padding: 0.5em 1.5em;
    127   line-height: 110%;
    128 }
    129 
    130 pre.synopsis {
    131     color: black;
    132     background-color: #dddddd;
    133 }
    134 
    135 div.admonition {
    136   border: medium solid;
    137   width: 90%;
    138   margin: .5em auto;
    139 }
    140 
    141 div.admonhead h3 {
    142         display: inline;
    143         margin-left: 1.5em;
    144 }
    145 
    146 div.admonbody {
    147         margin: .5em;
    148 }
    149 
    150 b.command {
    151     font-family: courier, monospace;
    152 }
    153 
    154 .item {
    155     width: 15em;
    156     float: left;
    157 }
    158 
    159 .secitem {
    160     font-weight: normal;
    161     width: 12.5em;
    162     float: left;
    163 }
     256  color: #000;
     257  background-color: #e9e9e9;
     258  border: 1px solid #050505;
     259  padding: .5em 1em;
     260  margin: 0 2em;
     261}
     262
     263/* Sections */
     264div.wrap h1, div.glossary h2 {
     265  background: #f5f6f7;
     266  padding: 1em 0 0.5em 0;
     267  margin: 0px auto;
     268}
     269
     270div.glossary h2 {
     271  text-align: center;
     272   font-size: 173%;
     273   padding-top: 0.4em;
     274   border-bottom: .1em solid #dbddec;
     275}
     276
     277div.package {
     278  background: #f5f6f7;
     279  border-bottom: 0.2em solid #dbddec;
     280  padding: 0.5em 0.5em 0.3em 0.5em;
     281  margin: 0px auto;
     282}
     283
     284div.installation {
     285  padding: 0 0.5em 0.3em 0.5em;
     286  margin: 0.5em 0 0.5em 0;
     287}
     288
     289div.configuration {
     290  background:   #fefefe;
     291  border-top: 0.2em solid #dbddec;
     292  padding: 0.5em;
     293  margin: 0.5em 0 .5em 0;
     294}
     295
     296div.content {
     297  background: #f5f6f7;
     298  border-top: 0.2em solid #dbddec;
     299  padding: 0.5em 0.5em 1em 0.5em;
     300  margin: 0.5em 0 .5em 0;
     301}
     302
     303div.installation h2, div.content h2 {
     304  padding-top: 0.3em;
     305  margin: 0;
     306}
     307
     308div.book, div.preface, div.part, div.chapter, div.sect1, div.appendix, div.index {
     309  padding-bottom: 0.5em;
     310}
     311
     312div.preface h1, div.part h1, div.chapter h1, div.sect1 h1, div.appendix h1, div.index h1 {
     313  background: #f5f6f7;
     314  border-bottom: .1em solid #dbddec;
     315  margin: 0px auto;
     316  padding: .5em;
     317}
     318
     319div.book h1 {
     320  background: #f5f6f7;
     321  margin: 0px auto;
     322  padding: 0.5em;
     323}
     324
     325div.book h2.subtitle {
     326  background: #dbddec;
     327  margin: 0px auto;
     328  padding: 0.2em;
     329}
     330div.authorgroup, div p.copyright, div.abstract, div p.pubdate, div.revhistory {
     331  background: #f5f6f7;
     332  margin: 0px auto;
     333  padding:  1em 0.5em;
     334}
     335
     336hr {
     337  background: #dbddec;
     338  height: .3em;
     339  border: 0px;
     340  margin: 0px auto;
     341  padding: 0;
     342}
     343
     344/* Last edited info */
     345p.updated {
     346  font-size: small;
     347  font-weight: bold;
     348  font-style: italic;
     349}
  • stylesheets/pdf/lfs-index.xsl

    rbad8b53 r3fe8b511  
    4949                </xsl:when>
    5050                <xsl:when test="$divtitle = 'E'">
     51                    <xsl:text>Configuration Files</xsl:text>
     52                </xsl:when>
     53                <xsl:when test="$divtitle = 'F'">
     54                  <xsl:text>Bootscripts</xsl:text>
     55                </xsl:when>
     56                <xsl:when test="$divtitle = 'G'">
    5157                    <xsl:text>Others</xsl:text>
    5258                </xsl:when>
  • stylesheets/pdf/lfs-pagesetup.xsl

    rbad8b53 r3fe8b511  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    42
    53<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    75                version="1.0">
    86
    9         <!-- Force section1's onto a new page -->
    10   <xsl:attribute-set name="section.level1.properties">
    11         <xsl:attribute name="break-after">
    12         <xsl:choose>
    13                         <xsl:when test="not(position()=last())">
    14                 <xsl:text>page</xsl:text>
    15                 </xsl:when>
    16         <xsl:otherwise>
    17                 <xsl:text>auto</xsl:text>
    18         </xsl:otherwise>
    19       </xsl:choose>
    20     </xsl:attribute>
    21   </xsl:attribute-set>
    22 
    23                 <!-- Header -->
    24   <xsl:attribute-set name="header.content.properties">
    25     <xsl:attribute name="font-family">
    26       <xsl:value-of select="$body.fontset"/>
    27     </xsl:attribute>
    28     <xsl:attribute name="text-align">right</xsl:attribute>
    29   </xsl:attribute-set>
    30 
     7    <!-- Header -->
    318  <xsl:template name="header.content">
    32     <xsl:value-of select="/book/bookinfo/title"/>
    33     <xsl:text> - </xsl:text>
    34     <xsl:value-of select="/book/bookinfo/subtitle"/>
     9    <xsl:param name="sequence" select="''"/>
     10    <fo:block>
     11      <xsl:attribute name="text-align">
     12        <xsl:choose>
     13          <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
     14          <xsl:otherwise>left</xsl:otherwise>
     15        </xsl:choose>
     16      </xsl:attribute>
     17      <xsl:value-of select="/book/bookinfo/title"/>
     18      <xsl:text> - </xsl:text>
     19      <xsl:value-of select="/book/bookinfo/subtitle"/>
     20    </fo:block>
    3521  </xsl:template>
    3622
    3723  <xsl:template name="header.table">
     24    <xsl:param name="sequence" select="''"/>
    3825    <xsl:param name="gentext-key" select="''"/>
    3926    <xsl:choose>
    40       <xsl:when test="$gentext-key = 'book'"/>
     27      <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
    4128      <xsl:otherwise>
    42         <xsl:call-template name="header.content"/>
     29        <xsl:call-template name="header.content">
     30          <xsl:with-param name="sequence" select="$sequence"/>
     31        </xsl:call-template>
    4332      </xsl:otherwise>
    4433    </xsl:choose>
    4534  </xsl:template>
    4635
    47                 <!-- Centered titles for book and part -->
     36    <!-- Centered titles for book and part -->
    4837  <xsl:template name="book.titlepage">
    4938    <fo:block space-before="2in">
     
    6150
    6251  <xsl:template name="part.titlepage">
    63     <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
     52    <fo:block>
    6453      <fo:block space-before="2.5in">
    6554        <xsl:call-template name="part.titlepage.before.recto"/>
     
    7463  </xsl:template>
    7564
    76         <!-- Margins -->
    77   <xsl:param name="page.margin.inner">0.75in</xsl:param>
    78   <xsl:param name="page.margin.outer">0.75in</xsl:param>
    79   <xsl:param name="title.margin.left">-1pc</xsl:param>
     65    <!-- Font size for chapter title. -->
     66  <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
     67    <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
     68            xsl:use-attribute-sets="chapter.titlepage.recto.style"
     69            font-size="21pt" font-weight="bold" text-align="left">
     70      <xsl:call-template name="component.title">
     71        <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
     72      </xsl:call-template>
     73    </fo:block>
     74  </xsl:template>
     75
     76    <!-- Margins -->
     77  <xsl:param name="page.margin.inner">0.5in</xsl:param>
     78  <xsl:param name="page.margin.outer">0.375in</xsl:param>
     79  <xsl:param name="title.margin.left">-0.7pc</xsl:param>
    8080  <xsl:attribute-set name="normal.para.spacing">
    81     <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
    82     <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
    83     <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
     81    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
     82    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
     83    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
    8484  </xsl:attribute-set>
    8585  <xsl:attribute-set name="list.block.spacing">
    86     <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
    87     <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
    88     <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
    89     <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
    90     <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
    91     <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
     86    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
     87    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
     88    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
     89    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
     90    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
     91    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
    9292  </xsl:attribute-set>
    9393  <xsl:attribute-set name="list.item.spacing">
     
    9797  </xsl:attribute-set>
    9898  <xsl:attribute-set name="verbatim.properties">
    99     <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
    100     <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
    101     <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
    102     <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
    103     <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
    104     <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
     99    <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
     100    <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
     101    <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
     102    <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute>
     103    <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute>
     104    <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>
    105105  </xsl:attribute-set>
    106106
    107         <!-- Others-->
     107    <!-- Others-->
    108108  <xsl:param name="header.rule" select="0"></xsl:param>
    109109  <xsl:param name="footer.rule" select="0"></xsl:param>
    110         <xsl:param name="marker.section.level" select="-1"></xsl:param>
     110  <xsl:param name="marker.section.level" select="-1"></xsl:param>
    111111
    112         <!-- Dropping a blank page -->
    113         <xsl:template name="book.titlepage.separator"/>
     112    <!-- Dropping a blank page -->
     113  <xsl:template name="book.titlepage.separator"/>
     114
    114115
    115116</xsl:stylesheet>
  • stylesheets/print/lfs-index.xsl

    rbad8b53 r3fe8b511  
    1 <?xml version='1.0' encoding='ISO-8859-1'?>
    2 <!DOCTYPE xsl:stylesheet [
    3 <!ENTITY lowercase "'abcdefghijklmnopqrstuvwxyz'">
    4 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'">
    5 <!ENTITY primary   'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'>
    6 <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'>
    7 ]>
    8 
    9 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    10 
    11 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    12                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
    13                 version="1.0">
    14 
    15     <!--Title-->
    16   <xsl:template match="index" mode="title.markup">
    17         <xsl:param name="allow-anchors" select="0"/>
    18     <xsl:text>Index of packages and important installed files</xsl:text>
    19         </xsl:template>
    20 
    21         <!-- Divisions-->
    22   <xsl:template match="indexterm" mode="index-div">
    23     <xsl:param name="scope" select="."/>
    24     <xsl:variable name="key"
    25                   select="translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
    26     <xsl:variable name="divtitle" select="translate($key, &lowercase;, &uppercase;)"/>
    27     <xsl:if test="key('letter', $key)[&scope;]
    28                   [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
    29       <fo:block>
    30         <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
    31           <xsl:call-template name="indexdiv.title">
    32             <xsl:with-param name="titlecontent">
    33               <xsl:choose>
    34                 <xsl:when test="$divtitle = 'A'">
    35                   <xsl:text>Packages</xsl:text>
    36               </xsl:when>
    37               <xsl:when test="$divtitle = 'B'">
    38                   <xsl:text>Programs</xsl:text>
    39               </xsl:when>
    40               <xsl:when test="$divtitle = 'C'">
    41                   <xsl:text>Libraries</xsl:text>
    42               </xsl:when>
    43               <xsl:when test="$divtitle = 'D'">
    44                   <xsl:text>Scripts</xsl:text>
    45               </xsl:when>
    46               <xsl:when test="$divtitle = 'E'">
    47                   <xsl:text>Others</xsl:text>
    48               </xsl:when>
    49               <xsl:otherwise>
    50                 <xsl:value-of select="$divtitle"/>
    51               </xsl:otherwise>
    52             </xsl:choose>
    53             </xsl:with-param>
    54           </xsl:call-template>
    55         </xsl:if>
    56         <fo:block>
    57           <xsl:apply-templates select="key('letter', $key)[&scope;]
    58                                       [count(.|key('primary', &primary;)[&scope;][1])=1]"
    59                               mode="index-primary">
    60             <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
    61             <xsl:with-param name="scope" select="$scope"/>
    62           </xsl:apply-templates>
    63         </fo:block>
    64       </fo:block>
    65     </xsl:if>
    66   </xsl:template>
    67 
    68         <!-- The separator -->
    69   <xsl:template match="indexterm" mode="reference">
    70     <xsl:param name="scope" select="."/>
    71     <xsl:text>:   </xsl:text>
    72         <xsl:call-template name="reference">
    73         <xsl:with-param name="zones" select="normalize-space(@zone)"/>
    74         <xsl:with-param name="scope" select="$scope"/>
    75       </xsl:call-template>
    76   </xsl:template>
    77  
    78         <!--Bookmarks-->
    79   <xsl:template name="reference">
    80     <xsl:param name="scope" select="."/>
    81     <xsl:param name="zones"/>
    82     <xsl:choose>
    83       <xsl:when test="contains($zones, ' ')">
    84         <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
    85         <xsl:variable name="zone2" select="substring-after($zones, ' ')"/>
    86         <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
    87         <xsl:variable name="target2" select="key('id', $zone2)[&scope;]"/>
    88         <xsl:variable name="id">
    89           <xsl:call-template name="object.id">
    90             <xsl:with-param name="object" select="$target[1]"/>
    91           </xsl:call-template>
    92         </xsl:variable>
    93         <xsl:variable name="id2">
    94           <xsl:call-template name="object.id">
    95             <xsl:with-param name="object" select="$target2[1]"/>
    96           </xsl:call-template>
    97         </xsl:variable>
    98         <fo:basic-link internal-destination="{$id}">
    99           <xsl:apply-templates select="$target" mode="page.citation">
    100                 <xsl:with-param name="id" select="$id"/>
    101           </xsl:apply-templates>
    102         </fo:basic-link>
    103           <xsl:text> ,  </xsl:text>
    104         <fo:basic-link internal-destination="{$id2}">
    105           <xsl:apply-templates select="$target2" mode="page.citation">
    106                 <xsl:with-param name="id" select="$id2"/>
    107           </xsl:apply-templates>
    108         </fo:basic-link>
    109       </xsl:when>
    110       <xsl:otherwise>
    111         <xsl:variable name="zone" select="$zones"/>
    112         <xsl:variable name="target" select="key('id', $zone)[&scope;]"/>
    113         <xsl:variable name="id">
    114           <xsl:call-template name="object.id">
    115             <xsl:with-param name="object" select="$target[1]"/>
    116           </xsl:call-template>
    117         </xsl:variable>
    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:otherwise>
    124     </xsl:choose>
    125   </xsl:template>
    126 
    127 </xsl:stylesheet>
  • stylesheets/print/lfs-pagesetup.xsl

    rbad8b53 r3fe8b511  
    1 <?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    4 
    5 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    6                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
    7                 version="1.0">
    8 
    9         <!-- Force section1's onto a new page -->
    10   <xsl:attribute-set name="section.level1.properties">
    11         <xsl:attribute name="break-after">
    12         <xsl:choose>
    13                         <xsl:when test="not(position()=last())">
    14                 <xsl:text>page</xsl:text>
    15                 </xsl:when>
    16         <xsl:otherwise>
    17                 <xsl:text>auto</xsl:text>
    18         </xsl:otherwise>
    19       </xsl:choose>
    20     </xsl:attribute>
    21   </xsl:attribute-set>
    22 
    23                 <!-- Header -->
    24   <xsl:template name="header.content">
    25         <xsl:param name="sequence" select="''"/>
    26                 <fo:block>
    27       <xsl:attribute name="text-align">
    28         <xsl:choose>
    29           <xsl:when test="$sequence = 'first' or $sequence = 'odd'">right</xsl:when>
    30           <xsl:otherwise>left</xsl:otherwise>
    31         </xsl:choose>
    32       </xsl:attribute>
    33       <xsl:value-of select="/book/bookinfo/title"/>
    34       <xsl:text> - </xsl:text>
    35       <xsl:value-of select="/book/bookinfo/subtitle"/>
    36     </fo:block>
    37   </xsl:template>
    38 
    39   <xsl:template name="header.table">
    40         <xsl:param name="sequence" select="''"/>
    41     <xsl:param name="gentext-key" select="''"/>
    42     <xsl:choose>
    43       <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
    44       <xsl:otherwise>
    45         <xsl:call-template name="header.content">
    46                                         <xsl:with-param name="sequence" select="$sequence"/>
    47                                 </xsl:call-template>
    48       </xsl:otherwise>
    49     </xsl:choose>
    50   </xsl:template>
    51 
    52                 <!-- Centered titles for book and part -->
    53   <xsl:template name="book.titlepage">
    54     <fo:block space-before="2in">
    55       <fo:block>
    56         <xsl:call-template name="book.titlepage.before.recto"/>
    57         <xsl:call-template name="book.titlepage.recto"/>
    58       </fo:block>
    59       <fo:block>
    60         <xsl:call-template name="book.titlepage.before.verso"/>
    61         <xsl:call-template name="book.titlepage.verso"/>
    62       </fo:block>
    63       <xsl:call-template name="book.titlepage.separator"/>
    64     </fo:block>
    65   </xsl:template>
    66 
    67   <xsl:template name="part.titlepage">
    68     <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
    69       <fo:block space-before="2.5in">
    70         <xsl:call-template name="part.titlepage.before.recto"/>
    71         <xsl:call-template name="part.titlepage.recto"/>
    72       </fo:block>
    73       <fo:block>
    74         <xsl:call-template name="part.titlepage.before.verso"/>
    75         <xsl:call-template name="part.titlepage.verso"/>
    76       </fo:block>
    77       <xsl:call-template name="part.titlepage.separator"/>
    78     </fo:block>
    79   </xsl:template>
    80 
    81         <!-- Margins -->
    82   <xsl:param name="page.margin.inner">1in</xsl:param>
    83   <xsl:param name="page.margin.outer">0.5in</xsl:param>
    84   <xsl:param name="title.margin.left">-1pc</xsl:param>
    85   <xsl:attribute-set name="normal.para.spacing">
    86     <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
    87     <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
    88     <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
    89   </xsl:attribute-set>
    90   <xsl:attribute-set name="list.block.spacing">
    91     <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
    92     <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
    93     <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
    94     <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
    95     <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
    96     <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
    97   </xsl:attribute-set>
    98   <xsl:attribute-set name="list.item.spacing">
    99     <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
    100     <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
    101     <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
    102   </xsl:attribute-set>
    103   <xsl:attribute-set name="verbatim.properties">
    104     <xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
    105     <xsl:attribute name="space-before.optimum">0.8em</xsl:attribute>
    106     <xsl:attribute name="space-before.maximum">1em</xsl:attribute>
    107     <xsl:attribute name="space-after.minimum">0.6em</xsl:attribute>
    108     <xsl:attribute name="space-after.optimum">0.8em</xsl:attribute>
    109     <xsl:attribute name="space-after.maximum">1em</xsl:attribute>
    110   </xsl:attribute-set>
    111 
    112         <!-- Others-->
    113   <xsl:param name="header.rule" select="0"></xsl:param>
    114   <xsl:param name="footer.rule" select="0"></xsl:param>
    115         <xsl:param name="marker.section.level" select="-1"></xsl:param>
    116 
    117         <!-- Dropping a blank page -->
    118         <xsl:template name="book.titlepage.separator"/>
    119 
    120 </xsl:stylesheet>
  • stylesheets/xhtml/lfs-admon.xsl

    rbad8b53 r3fe8b511  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    42
    53<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    75                version="1.0">
    86
    9         <!-- Use graphics in admonitions -->
     7    <!-- Use graphics in admonitions -->
    108  <xsl:param name="admon.graphics" select="1"/>
    119  <xsl:param name="admon.graphics.path">../images/</xsl:param>
    1210  <xsl:param name="admon.graphics.extension" select="'.png'"/>
    1311
    14         <!-- Changing the output tagging -->
     12    <!-- Changing the output tagging -->
    1513  <xsl:template name="graphical.admonition">
    1614    <xsl:variable name="admon.type">
     
    2422      </xsl:choose>
    2523    </xsl:variable>
    26     <div class="admonition">
    27         <div class ="admonhead">
    28         <img alt="[{$admon.type}]">
     24    <xsl:variable name="alt">
     25      <xsl:call-template name="gentext">
     26        <xsl:with-param name="key" select="$admon.type"/>
     27      </xsl:call-template>
     28    </xsl:variable>
     29    <div class="{name(.)}">
     30      <div class ="admonhead">
     31        <img alt="[{$alt}]">
    2932          <xsl:attribute name="src">
    3033            <xsl:call-template name="admon.graphic"/>
    3134          </xsl:attribute>
    3235        </img>
    33         <h3 class="{name(.)}">
    34           <xsl:value-of select="$admon.type"/>
    35           <xsl:if test="title">
    36             <xsl:text>: </xsl:text>
    37             <xsl:value-of select="title"/>
    38           </xsl:if>
     36        <h3 class="admontitle">
     37          <xsl:apply-templates select="." mode="object.title.markup"/>
    3938        </h3>
    4039      </div>
    4140      <div class="admonbody">
    42                                 <xsl:apply-templates/>
     41        <xsl:apply-templates/>
    4342      </div>
    4443    </div>
  • stylesheets/xhtml/lfs-legalnotice.xsl

    rbad8b53 r3fe8b511  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    42
    53<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    75                version="1.0">
    86
    9         <!-- Generating the page -->
    10 
     7    <!-- Generating the page -->
    118  <xsl:template match="legalnotice" mode="titlepage.mode">
    129    <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
     
    3027              <xsl:apply-templates mode="titlepage.mode"/>
    3128            </div>
    32             <hr/>
    3329            <div class="navfooter">
    3430              <ul class="footerlinks">
    35                 <li>
     31                <li class="home">
    3632                  <a accesskey="h">
    3733                    <xsl:attribute name="href">
    38                       <xsl:text>../index.html</xsl:text>
     34                      <xsl:text>index.html</xsl:text>
    3935                    </xsl:attribute>
    40                     <xsl:text>Home</xsl:text>
     36                    <xsl:attribute name="title">
     37                      <xsl:value-of select="/book/bookinfo/title"/>
     38                      <xsl:text> - </xsl:text>
     39                      <xsl:value-of select="/book/bookinfo/subtitle"/>
     40                    </xsl:attribute>
     41                    <xsl:call-template name="navig.content">
     42                      <xsl:with-param name="direction" select="'home'"/>
     43                    </xsl:call-template>
    4144                  </a>
    4245                </li>
  • stylesheets/xhtml/lfs-mixed.xsl

    rbad8b53 r3fe8b511  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    42
    53<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    75                version="1.0">
    86
     7    <!-- screen -->
    98  <xsl:template match="screen">
    109    <xsl:choose>
    11                 <!-- Temporally hack -->
    12 <!-- Broke userinput   <xsl:when test="child::* = userinput">
    13         <pre class="{name(.)}">
    14            <kbd class="command">
    15             <xsl:value-of select="."/>
    16           </kbd>
     10      <xsl:when test="child::* = userinput">
     11        <pre class="userinput">
     12            <xsl:apply-templates/>
    1713        </pre>
    18       </xsl:when> -->
    19       <!-- This should be fixed in the XML code -->
    20      
    21       <xsl:when test="contains(text() , 'SBU')">
    22         <p class="sbu">
    23           <tt>
    24             <xsl:value-of select="substring-before(text() , 'R')"/>
    25             <br/>
    26             <xsl:value-of select="substring-after(text() , 'U')"/>
    27           </tt>
    28         </p>
    2914      </xsl:when>
    30      
    3115      <xsl:otherwise>
    3216        <pre class="{name(.)}">
     
    3620    </xsl:choose>
    3721  </xsl:template>
     22 
     23    <!-- userinput -->
     24  <xsl:template match="userinput">
     25    <xsl:choose>
     26      <xsl:when test="ancestor::screen">
     27        <kbd class="command">
     28          <xsl:apply-templates/>
     29        </kbd>
     30      </xsl:when>
     31      <xsl:otherwise>
     32        <xsl:apply-imports/>
     33      </xsl:otherwise>
     34    </xsl:choose>
     35  </xsl:template>
     36
     37    <!-- Body attributes -->
     38  <xsl:template name="body.attributes">
     39    <xsl:attribute name="id">
     40      <xsl:text>blfs</xsl:text>
     41    </xsl:attribute>
     42    <xsl:attribute name="class">
     43      <xsl:value-of select="substring-after(/book/bookinfo/subtitle, ' ')"/>
     44    </xsl:attribute>
     45  </xsl:template>
     46
     47    <!-- External URLs in italic font -->
     48  <xsl:template match="ulink" name="ulink">
     49    <a>
     50      <xsl:if test="@id">
     51        <xsl:attribute name="id">
     52          <xsl:value-of select="@id"/>
     53        </xsl:attribute>
     54      </xsl:if>
     55      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
     56       <strong>
     57        <xsl:choose>
     58          <xsl:when test="count(child::node())=0">
     59            <xsl:value-of select="@url"/>
     60          </xsl:when>
     61          <xsl:otherwise>
     62            <xsl:apply-templates/>
     63          </xsl:otherwise>
     64        </xsl:choose>
     65      </strong>
     66    </a>
     67  </xsl:template>
     68 
     69    <!-- The <code> xhtml tag have look issues in some browsers, like Konqueror and.
     70      isn't semantically correct (a filename isn't a code fragment) We will use <tt> for now. -->
     71  <xsl:template name="inline.monoseq">
     72    <xsl:param name="content">
     73      <xsl:call-template name="anchor"/>
     74      <xsl:call-template name="simple.xlink">
     75        <xsl:with-param name="content">
     76          <xsl:apply-templates/>
     77        </xsl:with-param>
     78      </xsl:call-template>
     79    </xsl:param>
     80    <tt class="{local-name(.)}">
     81      <xsl:if test="@dir">
     82        <xsl:attribute name="dir">
     83          <xsl:value-of select="@dir"/>
     84        </xsl:attribute>
     85      </xsl:if>
     86      <xsl:copy-of select="$content"/>
     87    </tt>
     88  </xsl:template>
     89 
     90  <xsl:template name="inline.boldmonoseq">
     91    <xsl:param name="content">
     92      <xsl:call-template name="anchor"/>
     93      <xsl:call-template name="simple.xlink">
     94        <xsl:with-param name="content">
     95          <xsl:apply-templates/>
     96        </xsl:with-param>
     97      </xsl:call-template>
     98    </xsl:param>
     99    <!-- don't put <strong> inside figure, example, or table titles -->
     100    <!-- or other titles that may already be represented with <strong>'s. -->
     101    <xsl:choose>
     102      <xsl:when test="local-name(..) = 'title' and (local-name(../..) = 'figure'
     103              or local-name(../..) = 'example' or local-name(../..) = 'table' or local-name(../..) = 'formalpara')">
     104        <tt class="{local-name(.)}">
     105          <xsl:if test="@dir">
     106            <xsl:attribute name="dir">
     107              <xsl:value-of select="@dir"/>
     108            </xsl:attribute>
     109          </xsl:if>
     110          <xsl:copy-of select="$content"/>
     111        </tt>
     112      </xsl:when>
     113      <xsl:otherwise>
     114        <strong class="{local-name(.)}">
     115          <tt>
     116            <xsl:if test="@dir">
     117              <xsl:attribute name="dir">
     118                <xsl:value-of select="@dir"/>
     119              </xsl:attribute>
     120            </xsl:if>
     121            <xsl:copy-of select="$content"/>
     122          </tt>
     123        </strong>
     124      </xsl:otherwise>
     125    </xsl:choose>
     126  </xsl:template>
     127 
     128  <xsl:template name="inline.italicmonoseq">
     129    <xsl:param name="content">
     130      <xsl:call-template name="anchor"/>
     131      <xsl:call-template name="simple.xlink">
     132        <xsl:with-param name="content">
     133          <xsl:apply-templates/>
     134        </xsl:with-param>
     135      </xsl:call-template>
     136    </xsl:param>
     137    <em class="{local-name(.)}">
     138      <tt>
     139        <xsl:if test="@dir">
     140          <xsl:attribute name="dir">
     141            <xsl:value-of select="@dir"/>
     142          </xsl:attribute>
     143        </xsl:if>
     144        <xsl:copy-of select="$content"/>
     145      </tt>
     146    </em>
     147  </xsl:template>
    38148
    39149</xsl:stylesheet>
  • stylesheets/xhtml/lfs-navigational.xsl

    rbad8b53 r3fe8b511  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->
    4 <!-- Updates by Bruce Dubbs <bdubbs@linuxfromscratch.org> -->
    52
    63<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    1714  </xsl:template>
    1815
    19         <!-- Header Navigation-->
     16    <!-- Header Navigation-->
    2017  <xsl:template name="header.navigation">
    2118    <xsl:param name="prev" select="/foo"/>
     
    3027        <xsl:if test="$home != .">
    3128          <div class="headertitles">
    32             <p>
    33               <xsl:apply-templates select="$home" mode="object.title.markup"/>
    34               <xsl:text> &#8211; </xsl:text> <!-- ndash -->
     29            <h4>
     30              <xsl:text>Beyond Linux From Scratch - </xsl:text>
    3531              <xsl:apply-templates select="$home" mode="object.subtitle.markup"/>
    36             </p>
     32            </h4>
    3733            <xsl:if test="$up != $home">
    38               <p><b>
     34              <h3>
    3935                <xsl:apply-templates select="$up" mode="object.title.markup"/>
    40               </b></p>
     36              </h3>
    4137            </xsl:if>
    4238          </div>
    4339        </xsl:if>
    44         <div class="headerlinks">
    45           <div class='prev'>
    46             <xsl:if test="count($prev)&gt;0 and $prev != $home">
     40        <ul class="headerlinks">
     41          <xsl:if test="count($prev)&gt;0 and $prev != $home">
     42            <li class="prev">
    4743              <a accesskey="p">
    4844                <xsl:attribute name="href">
     
    5147                  </xsl:call-template>
    5248                </xsl:attribute>
    53                 <xsl:text>Prev</xsl:text>
    54               </a>
    55             </xsl:if>
    56           <xsl:text>&#160;</xsl:text></div>  <!-- nbsp -->
    57           <div class='next'><xsl:text>&#160;</xsl:text>
    58             <xsl:if test="count($next)&gt;0">
     49                <xsl:attribute name="title">
     50                  <xsl:value-of select="$prev/title"/>
     51                </xsl:attribute>
     52                <xsl:call-template name="navig.content">
     53                  <xsl:with-param name="direction" select="'prev'"/>
     54                </xsl:call-template>
     55              </a>
     56              <p>
     57                <xsl:value-of select="$prev/title"/>
     58              </p>
     59            </li>
     60          </xsl:if>
     61          <xsl:if test="count($next)&gt;0">
     62            <li class="next">
    5963              <a accesskey="n">
    6064                <xsl:attribute name="href">
     
    6367                  </xsl:call-template>
    6468                </xsl:attribute>
    65                 <xsl:text>Next</xsl:text>
    66               </a>
    67             </xsl:if>
    68           </div>
    69           <div class='home'>
     69                <xsl:attribute name="title">
     70                  <xsl:choose>
     71                    <xsl:when test="local-name($next)='index'">
     72                      <xsl:call-template name="gentext">
     73                        <xsl:with-param name="key">Index</xsl:with-param>
     74                      </xsl:call-template>
     75                    </xsl:when>
     76                    <xsl:otherwise>
     77                      <xsl:value-of select="$next/title"/>
     78                    </xsl:otherwise>
     79                  </xsl:choose>
     80                </xsl:attribute>
     81                <xsl:call-template name="navig.content">
     82                  <xsl:with-param name="direction" select="'next'"/>
     83                </xsl:call-template>
     84              </a>
     85              <p>
     86                <xsl:choose>
     87                  <xsl:when test="local-name($next)='index'">
     88                    <xsl:call-template name="gentext">
     89                      <xsl:with-param name="key">Index</xsl:with-param>
     90                    </xsl:call-template>
     91                  </xsl:when>
     92                  <xsl:otherwise>
     93                    <xsl:value-of select="$next/title"/>
     94                  </xsl:otherwise>
     95                </xsl:choose>
     96              </p>
     97            </li>
     98          </xsl:if>
     99            <li class="up">
     100              <xsl:if test="count($up)&gt;0 and $up != $home">
     101                <a accesskey="u">
     102                  <xsl:attribute name="href">
     103                    <xsl:call-template name="href.target">
     104                      <xsl:with-param name="object" select="$up"/>
     105                    </xsl:call-template>
     106                  </xsl:attribute>
     107                  <xsl:attribute name="title">
     108                    <xsl:apply-templates select="$up" mode="object.title.markup"/>
     109                  </xsl:attribute>
     110                  <xsl:call-template name="navig.content">
     111                    <xsl:with-param name="direction" select="'up'"/>
     112                  </xsl:call-template>
     113                </a>
     114              </xsl:if>
     115              <xsl:text>.</xsl:text>
     116            </li>
     117          <li class="home">
    70118            <a accesskey="h">
    71119              <xsl:attribute name="href">
     
    74122                </xsl:call-template>
    75123              </xsl:attribute>
    76               <xsl:text>Home</xsl:text>
     124                <xsl:attribute name="title">
     125                  <xsl:value-of select="$home/bookinfo/title"/>
     126                  <xsl:text> - </xsl:text>
     127                  <xsl:value-of select="$home/bookinfo/subtitle"/>
     128                </xsl:attribute>
     129                <xsl:call-template name="navig.content">
     130                  <xsl:with-param name="direction" select="'home'"/>
     131                </xsl:call-template>
    77132            </a>
    78           </div>
    79         </div>
     133          </li>
     134        </ul>
    80135      </div>
    81136    </xsl:if>
    82137  </xsl:template>
    83138
    84         <!-- Footer Navigation-->
     139    <!-- Footer Navigation-->
    85140  <xsl:template name="footer.navigation">
    86141    <xsl:param name="prev" select="/foo"/>
     
    93148    <xsl:if test="$row">
    94149      <div class="navfooter">
    95           <div class='prev'>
    96             <xsl:if test="count($prev)&gt;0 and $prev != $home">
     150        <ul>
     151          <xsl:if test="count($prev)&gt;0 and $prev != $home">
     152            <li class="prev">
    97153              <a accesskey="p">
    98154                <xsl:attribute name="href">
     
    101157                  </xsl:call-template>
    102158                </xsl:attribute>
    103                 <xsl:text>Prev</xsl:text>
    104               </a><br/>
    105               <!-- <xsl:text> </xsl:text> -->
    106               <xsl:apply-templates select="$prev" mode="object.title.markup"/>
    107             </xsl:if>
    108             <xsl:text>&#160;</xsl:text>
    109           </div> <!-- nbsp -->
    110           <div class='next'><xsl:text>&#160;</xsl:text>
     159                <xsl:attribute name="title">
     160                  <xsl:value-of select="$prev/title"/>
     161                </xsl:attribute>
     162                <xsl:call-template name="navig.content">
     163                  <xsl:with-param name="direction" select="'prev'"/>
     164                </xsl:call-template>
     165              </a>
     166              <p>
     167                <xsl:value-of select="$prev/title"/>
     168              </p>
     169            </li>
     170          </xsl:if>
    111171          <xsl:if test="count($next)&gt;0">
     172            <li class="next">
    112173              <a accesskey="n">
    113174                <xsl:attribute name="href">
     
    116177                  </xsl:call-template>
    117178                </xsl:attribute>
    118                 <xsl:text>Next</xsl:text>
    119               </a><br/>
    120               <!-- <xsl:text> </xsl:text> -->
    121               <xsl:apply-templates select="$next" mode="object.title.markup"/>
    122             </xsl:if>
    123           </div>
    124           <xsl:if test="count($up)&gt;0 and $up != $home">
    125             <div class='up'>
    126               <a accesskey="u">
    127                 <xsl:attribute name="href">
    128                   <xsl:call-template name="href.target">
    129                     <xsl:with-param name="object" select="$up"/>
    130                   </xsl:call-template>
    131                 </xsl:attribute>
    132                 <xsl:text>Up</xsl:text>
    133               </a>
    134             </div>
    135           </xsl:if>
    136           <div class='home'>
    137             <xsl:if  test="$home != .">
    138               <a accesskey="h">
    139                 <xsl:attribute name="href">
    140                   <xsl:call-template name="href.target">
    141                     <xsl:with-param name="object" select="$home"/>
    142                   </xsl:call-template>
    143                 </xsl:attribute>
    144                 <xsl:text>Home</xsl:text>
    145               </a>
    146             </xsl:if>
    147           </div>
     179                <xsl:attribute name="title">
     180                  <xsl:choose>
     181                    <xsl:when test="local-name($next)='index'">
     182                      <xsl:call-template name="gentext">
     183                        <xsl:with-param name="key">Index</xsl:with-param>
     184                      </xsl:call-template>
     185                    </xsl:when>
     186                    <xsl:otherwise>
     187                      <xsl:value-of select="$next/title"/>
     188                    </xsl:otherwise>
     189                  </xsl:choose>
     190                </xsl:attribute>
     191                <xsl:call-template name="navig.content">
     192                  <xsl:with-param name="direction" select="'next'"/>
     193                </xsl:call-template>
     194              </a>
     195              <p>
     196                <xsl:choose>
     197                  <xsl:when test="local-name($next)='index'">
     198                    <xsl:call-template name="gentext">
     199                      <xsl:with-param name="key">Index</xsl:with-param>
     200                    </xsl:call-template>
     201                  </xsl:when>
     202                  <xsl:otherwise>
     203                    <xsl:value-of select="$next/title"/>
     204                  </xsl:otherwise>
     205                </xsl:choose>
     206              </p>
     207            </li>
     208          </xsl:if>
     209            <li class="up">
     210              <xsl:if test="count($up)&gt;0 and $up != $home">
     211                <a accesskey="u">
     212                  <xsl:attribute name="href">
     213                    <xsl:call-template name="href.target">
     214                      <xsl:with-param name="object" select="$up"/>
     215                    </xsl:call-template>
     216                  </xsl:attribute>
     217                  <xsl:attribute name="title">
     218                    <xsl:apply-templates select="$up" mode="object.title.markup"/>
     219                  </xsl:attribute>
     220                  <xsl:call-template name="navig.content">
     221                    <xsl:with-param name="direction" select="'up'"/>
     222                  </xsl:call-template>
     223                </a>
     224              </xsl:if>
     225              <xsl:text>.</xsl:text>
     226            </li>
     227            <li class="home">
     228              <xsl:if  test="$home != .">
     229                <a accesskey="h">
     230                  <xsl:attribute name="href">
     231                    <xsl:call-template name="href.target">
     232                      <xsl:with-param name="object" select="$home"/>
     233                    </xsl:call-template>
     234                  </xsl:attribute>
     235                  <xsl:attribute name="title">
     236                    <xsl:value-of select="$home/bookinfo/title"/>
     237                    <xsl:text> - </xsl:text>
     238                    <xsl:value-of select="$home/bookinfo/subtitle"/>
     239                  </xsl:attribute>
     240                  <xsl:call-template name="navig.content">
     241                    <xsl:with-param name="direction" select="'home'"/>
     242                  </xsl:call-template>
     243                </a>
     244              </xsl:if>
     245              <xsl:text>.</xsl:text>
     246            </li>
     247        </ul>
    148248      </div>
    149249    </xsl:if>
  • stylesheets/xhtml/lfs-titles.xsl

    rbad8b53 r3fe8b511  
    11<?xml version='1.0' encoding='ISO-8859-1'?>
    2 
    3 <!-- Version 0.9- Manuel Canales Esparcia <macana@lfs-es.org> -->
    42
    53<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     
    97  <xsl:template name="part.titlepage">
    108    <div class="titlepage">
     9      <xsl:if test="@id">
     10        <a id="{@id}" name="{@id}"/>
     11      </xsl:if>
    1112      <h1 class="{name(.)}">
    1213        <xsl:value-of select="title"/>
     
    1718  <xsl:template name="chapter.titlepage">
    1819    <div class="titlepage">
     20      <xsl:if test="@id">
     21        <a id="{@id}" name="{@id}"/>
     22      </xsl:if>
    1923      <h1 class="{name(.)}">
    2024        <xsl:value-of select="title"/>
     
    2529  <xsl:template name="preface.titlepage">
    2630    <div class="titlepage">
     31      <xsl:if test="@id">
     32        <a id="{@id}" name="{@id}"/>
     33      </xsl:if>
     34      <h1 class="{name(.)}">
     35        <xsl:value-of select="title"/>
     36      </h1>
     37    </div>
     38  </xsl:template>
     39
     40  <xsl:template name="appendix.titlepage">
     41    <div class="titlepage">
     42      <xsl:if test="@id">
     43        <a id="{@id}" name="{@id}"/>
     44      </xsl:if>
    2745      <h1 class="{name(.)}">
    2846        <xsl:value-of select="title"/>
     
    3250
    3351  <xsl:template name="sect1.titlepage">
    34     <xsl:choose>
    35                 <!-- I should find a better test -->
    36       <xsl:when test="position() = 4">
    37         <div class="titlepage">
    38           <xsl:if test="@id">
    39             <a id="{@id}" name="{@id}"/>
    40           </xsl:if>
    41           <h2 class="{name(.)}">
    42             <xsl:value-of select="title"/>
    43           </h2>
    44         </div>
    45       </xsl:when>
    46       <xsl:otherwise>
    47         <div class="titlepage">
    48           <h1 class="{name(.)}">
    49             <xsl:value-of select="title"/>
    50           </h1>
    51         </div>
    52       </xsl:otherwise>
    53     </xsl:choose>
     52    <div class="titlepage">
     53      <xsl:if test="@id">
     54        <a id="{@id}" name="{@id}"/>
     55      </xsl:if>
     56      <h1 class="{name(.)}">
     57        <xsl:value-of select="title"/>
     58      </h1>
     59    </div>
    5460  </xsl:template>
    5561
     
    6268            <a id="{@id}" name="{@id}"/>
    6369          </xsl:if>
    64           <h3 class="{name(.)}">
     70          <h2 class="{name(.)}">
    6571            <xsl:value-of select="title"/>
    66           </h3>
     72          </h2>
    6773        </div>
    6874      </xsl:otherwise>
     
    7884  </xsl:template>
    7985
     86    <!-- Added the role param for proper punctuation in xref calls. -->
     87  <xsl:template match="*" mode="insert.title.markup">
     88    <xsl:param name="purpose"/>
     89    <xsl:param name="xrefstyle"/>
     90    <xsl:param name="title"/>
     91    <xsl:param name="role"/>
     92    <xsl:choose>
     93      <xsl:when test="$purpose = 'xref' and titleabbrev">
     94        <xsl:apply-templates select="." mode="titleabbrev.markup"/>
     95      </xsl:when>
     96      <xsl:otherwise>
     97        <xsl:copy-of select="$title"/>
     98        <xsl:value-of select="$role"/>
     99      </xsl:otherwise>
     100    </xsl:choose>
     101  </xsl:template>
     102
    80103</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.