Changeset af7b097 for stylesheets/pdf
- Timestamp:
- 01/09/2005 06:25:29 AM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 1a0f605
- Parents:
- 6822b09
- Location:
- stylesheets/pdf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
stylesheets/pdf/lfs-index.xsl
r6822b09 raf7b097 4 4 <!ENTITY uppercase "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"> 5 5 <!ENTITY primary 'normalize-space(concat(primary/@sortas, primary[not(@sortas)]))'> 6 <!ENTITY secondary 'normalize-space(concat(secondary/@sortas, secondary[not(@sortas)]))'>7 6 <!ENTITY scope 'count(ancestor::node()|$scope) = count(ancestor::node())'> 8 <!ENTITY sep '" "'>9 7 ]> 10 11 <!-- Version 0.9 - Manuel Canales Esparcia <macana@lfs-es.org> -->12 8 13 9 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" … … 15 11 version="1.0"> 16 12 17 <!--Only one column to fit the table layout-->18 <xsl:param name="column.count.index" select="1"/>19 20 13 <!--Title--> 21 14 <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> 24 20 25 21 <!-- Divisions--> 26 22 <xsl:template match="indexterm" mode="index-div"> 27 23 <xsl:param name="scope" select="."/> … … 37 33 <xsl:choose> 38 34 <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> 40 38 </xsl:when> 41 39 <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> 43 43 </xsl:when> 44 44 <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> 46 48 </xsl:when> 47 49 <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> 49 53 </xsl:when> 50 54 <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> 52 58 </xsl:when> 53 59 <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> 55 63 </xsl:when> 56 64 <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> 58 68 </xsl:when> 59 69 <xsl:otherwise> 60 70 <xsl:value-of select="$divtitle"/> 61 71 </xsl:otherwise> 62 72 </xsl:choose> 63 73 </xsl:with-param> 64 74 </xsl:call-template> 65 75 </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> 79 84 </fo:block> 80 85 </xsl:if> 81 86 </xsl:template> 82 87 83 <!-- Dropping the separator from here-->88 <!-- The separator --> 84 89 <xsl:template match="indexterm" mode="reference"> 85 90 <xsl:param name="scope" select="."/> 86 <xsl:call-template name="reference"> 91 <xsl:text>: </xsl:text> 92 <xsl:call-template name="reference"> 87 93 <xsl:with-param name="zones" select="normalize-space(@zone)"/> 88 94 <xsl:with-param name="scope" select="$scope"/> 89 95 </xsl:call-template> 90 96 </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>138 97 139 <!-- Targets titles and bookmarks-->98 <!--Bookmarks--> 140 99 <xsl:template name="reference"> 141 100 <xsl:param name="scope" select="."/> … … 157 116 </xsl:call-template> 158 117 </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> 179 129 </xsl:when> 180 130 <xsl:otherwise> … … 186 136 </xsl:call-template> 187 137 </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> 198 143 </xsl:otherwise> 199 144 </xsl:choose> 200 145 </xsl:template> 201 146 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 202 157 </xsl:stylesheet> -
stylesheets/pdf/lfs-mixed.xsl
r6822b09 raf7b097 33 33 34 34 <!-- Show URLs in italic font --> 35 < xsl:template match="ulink" name="ulink">35 <!--<xsl:template match="ulink" name="ulink"> 36 36 <fo:inline font-style="italic"> 37 37 <fo:basic-link xsl:use-attribute-sets="xref.properties"> … … 55 55 <xsl:if test="count(child::node()) != 0 56 56 and string(.) != @url 57 and $ulink.show != 0"> 57 and $ulink.show != 0">--> 58 58 <!-- yes, show the URI --> 59 <xsl:choose>59 <!-- <xsl:choose> 60 60 <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)"> 61 61 <xsl:text> </xsl:text> … … 85 85 </xsl:choose> 86 86 </xsl:if> 87 </xsl:template> 87 </xsl:template>--> 88 88 89 89 <!-- Split URLs (obsolete, keeped as reference) --> -
stylesheets/pdf/lfs-pagesetup.xsl
r6822b09 raf7b097 15 15 </xsl:choose> 16 16 </xsl:attribute> 17 <xsl:value-of select="/book/bookinfo/title"/> 18 <xsl:text> - </xsl:text> 17 <xsl:text>Beyond Linux From Scratch - </xsl:text> 19 18 <xsl:value-of select="/book/bookinfo/subtitle"/> 20 19 </fo:block> -
stylesheets/pdf/lfs-sections.xsl
r6822b09 raf7b097 20 20 21 21 <!-- 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"/> 24 24 25 25 <!-- Skip numeraration for sections with empty title -->
Note:
See TracChangeset
for help on using the changeset viewer.