source: stylesheets/pdf/lfs-mixed.xsl@ 276015d2

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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
Last change on this file since 276015d2 was 276015d2, checked in by Randy McMurchy <randy@…>, 17 years ago

Added the LastChangedBy and Date keywords then set the corresponding keyword property on each file in the repo

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

  • Property mode set to 100644
File size: 10.2 KB
RevLine 
[3fe8b511]1<?xml version='1.0' encoding='ISO-8859-1'?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:fo="http://www.w3.org/1999/XSL/Format"
5 version="1.0">
6
[276015d2]7<!--
8$LastChangedBy$
9$Date$
10-->
[3fe8b511]11
[3523830]12 <!-- This is a hack and isn't correct semantically. Theoretically, the beginpage
13 tags should be placed in the XML source only to render the PDF output and
[3fe8b511]14 should be removed after it. But there is no a better way and we need this.-->
15 <xsl:template match="beginpage">
16 <fo:block break-after="page"/>
17 </xsl:template>
[845e9193]18
[3fe8b511]19 <!-- Allow forced line breaks inside paragraphs emulating literallayout. -->
20 <xsl:template match="para">
21 <xsl:choose>
22 <xsl:when test="./@remap='verbatim'">
23 <fo:block wrap-option="no-wrap"
24 white-space-collapse="false"
25 white-space-treatment="preserve"
26 text-align="start"
27 linefeed-treatment="preserve">
28 <xsl:call-template name="anchor"/>
29 <xsl:apply-templates/>
30 </fo:block>
31 </xsl:when>
32 <xsl:otherwise>
33 <xsl:apply-imports/>
34 </xsl:otherwise>
35 </xsl:choose>
36 </xsl:template>
37
38 <!-- Show URLs in italic font -->
[af7b097]39 <!--<xsl:template match="ulink" name="ulink">
[3fe8b511]40 <fo:inline font-style="italic">
41 <fo:basic-link xsl:use-attribute-sets="xref.properties">
42 <xsl:attribute name="external-destination">
43 <xsl:call-template name="fo-external-image">
44 <xsl:with-param name="filename" select="@url"/>
45 </xsl:call-template>
46 </xsl:attribute>
47 <xsl:choose>
48 <xsl:when test="count(child::node())=0">
49 <xsl:call-template name="hyphenate-url">
50 <xsl:with-param name="url" select="@url"/>
51 </xsl:call-template>
52 </xsl:when>
53 <xsl:otherwise>
54 <xsl:apply-templates/>
55 </xsl:otherwise>
56 </xsl:choose>
57 </fo:basic-link>
58 </fo:inline>
59 <xsl:if test="count(child::node()) != 0
60 and string(.) != @url
[af7b097]61 and $ulink.show != 0">-->
[3fe8b511]62 <!-- yes, show the URI -->
[af7b097]63 <!-- <xsl:choose>
[3fe8b511]64 <xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
65 <xsl:text>&#xA0;</xsl:text>
66 <fo:footnote>
67 <xsl:call-template name="ulink.footnote.number"/>
68 <fo:footnote-body font-family="{$body.fontset}"
69 font-size="{$footnote.font.size}">
70 <fo:block>
71 <xsl:call-template name="ulink.footnote.number"/>
72 <xsl:text> </xsl:text>
73 <fo:inline>
74 <xsl:value-of select="@url"/>
75 </fo:inline>
76 </fo:block>
77 </fo:footnote-body>
78 </fo:footnote>
79 </xsl:when>
80 <xsl:otherwise>
81 <fo:inline hyphenate="false">
82 <xsl:text> [</xsl:text>
83 <xsl:call-template name="hyphenate-url">
84 <xsl:with-param name="url" select="@url"/>
85 </xsl:call-template>
86 <xsl:text>]</xsl:text>
87 </fo:inline>
88 </xsl:otherwise>
89 </xsl:choose>
90 </xsl:if>
[af7b097]91 </xsl:template>-->
[3fe8b511]92
93 <!-- Split URLs (obsolete, keeped as reference) -->
94 <!--<xsl:template name="hyphenate-url">
95 <xsl:param name="url" select="''"/>
96 <xsl:choose>
97 <xsl:when test="ancestor::varlistentry">
98 <xsl:choose>
99 <xsl:when test="string-length($url) > 90">
100 <xsl:value-of select="substring($url, 1, 50)"/>
101 <xsl:param name="rest" select="substring($url, 51)"/>
102 <xsl:value-of select="substring-before($rest, '/')"/>
103 <xsl:text> /</xsl:text>
104 <xsl:value-of select="substring-after($rest, '/')"/>
105 </xsl:when>
106 <xsl:otherwise>
107 <xsl:value-of select="$url"/>
108 </xsl:otherwise>
109 </xsl:choose>
110 </xsl:when>
111 <xsl:otherwise>
112 <xsl:value-of select="$url"/>-->
113 <!-- <xsl:value-of select="substring-before($url, '//')"/>
114 <xsl:text>// </xsl:text>
115 <xsl:call-template name="split-url">
116 <xsl:with-param name="url2" select="substring-after($url, '//')"/>
117 </xsl:call-template>-->
118 <!-- </xsl:otherwise>
119 </xsl:choose>
120 </xsl:template>-->
121
122 <!--<xsl:template name="split-url">
123 <xsl:choose>
124 <xsl:when test="contains($url2, '/')">
125 <xsl:param name="url2" select="''"/>
126 <xsl:value-of select="substring-before($url2, '/')"/>
127 <xsl:text> /</xsl:text>
128 <xsl:call-template name="split-url">
129 <xsl:with-param name="url2" select="substring-after($url2, '/')"/>
130 </xsl:call-template>
131 </xsl:when>
132 <xsl:otherwise>
133 <xsl:value-of select="$url2"/>
134 </xsl:otherwise>
135 </xsl:choose>
136 </xsl:template>-->
137
138 <!-- Shade screen -->
139 <xsl:param name="shade.verbatim" select="1"/>
140
141 <!-- How is rendered by default a variablelist -->
142 <xsl:param name="variablelist.as.blocks" select="1"/>
143 <xsl:param name="variablelist.max.termlength">32</xsl:param>
144
[3523830]145 <!-- Making the same look that in the XHTML output. -->
[3fe8b511]146 <xsl:template match="segmentedlist">
147 <!--<xsl:variable name="presentation">
148 <xsl:call-template name="pi-attribute">
149 <xsl:with-param name="pis"
150 select="processing-instruction('dbfo')"/>
151 <xsl:with-param name="attribute" select="'list-presentation'"/>
152 </xsl:call-template>
153 </xsl:variable>
154 <xsl:choose>
155 <xsl:when test="$presentation = 'table'">
156 <xsl:apply-templates select="." mode="seglist-table"/>
157 </xsl:when>
158 <xsl:when test="$presentation = 'list'">
159 <fo:block space-before.minimum="0.4em" space-before.optimum="0.6em"
160 space-before.maximum="0.8em">
161 <xsl:apply-templates/>
162 </fo:block>
163 </xsl:when>
164 <xsl:when test="$segmentedlist.as.table != 0">
165 <xsl:apply-templates select="." mode="seglist-table"/>
166 </xsl:when>
167 <xsl:otherwise>-->
[3523830]168 <fo:list-block provisional-distance-between-starts="11em"
169 provisional-label-separation="1em"
170 xsl:use-attribute-sets="list.block.spacing">
[3fe8b511]171 <xsl:apply-templates/>
[3523830]172 </fo:list-block>
[3fe8b511]173 <!--</xsl:otherwise>
174 </xsl:choose>-->
175 </xsl:template>
176
[3523830]177 <xsl:template match="seglistitem">
178 <xsl:apply-templates/>
179 </xsl:template>
180
181 <xsl:template match="seg">
182 <xsl:variable name="segnum" select="count(preceding-sibling::seg)+1"/>
183 <xsl:variable name="seglist" select="ancestor::segmentedlist"/>
184 <xsl:variable name="segtitles" select="$seglist/segtitle"/>
185 <!-- Note: segtitle is only going to be the right thing in a well formed
186 SegmentedList. If there are too many Segs or too few SegTitles,
187 you'll get something odd...maybe an error -->
188 <fo:list-item xsl:use-attribute-sets="list.item.spacing">
189 <fo:list-item-label end-indent="label-end()" text-align="start">
190 <fo:block>
191 <fo:inline font-weight="bold">
192 <xsl:apply-templates select="$segtitles[$segnum=position()]"
193 mode="segtitle-in-seg"/>
194 <xsl:text>: </xsl:text>
195 </fo:inline>
196 </fo:block>
197 </fo:list-item-label>
198 <fo:list-item-body start-indent="body-start()">
199 <fo:block text-align="left">
200 <xsl:apply-templates/>
201 </fo:block>
202 </fo:list-item-body>
203 </fo:list-item>
204 </xsl:template>
205
[3fe8b511]206 <!-- Presentation of literal tag -->
207 <xsl:template match="literal">
208 <fo:inline font-weight="normal">
209 <xsl:call-template name="inline.monoseq"/>
210 </fo:inline>
211 </xsl:template>
212
213 <!-- Left alingnament for itemizedlist -->
214 <xsl:template match="itemizedlist">
215 <xsl:variable name="id">
216 <xsl:call-template name="object.id"/>
217 </xsl:variable>
218 <xsl:variable name="label-width">
219 <xsl:call-template name="dbfo-attribute">
220 <xsl:with-param name="pis"
221 select="processing-instruction('dbfo')"/>
222 <xsl:with-param name="attribute" select="'label-width'"/>
223 </xsl:call-template>
224 </xsl:variable>
225 <xsl:if test="title">
226 <xsl:apply-templates select="title" mode="list.title.mode"/>
227 </xsl:if>
228 <!-- Preserve order of PIs and comments -->
229 <xsl:apply-templates
230 select="*[not(self::listitem
231 or self::title
232 or self::titleabbrev)]
233 |comment()[not(preceding-sibling::listitem)]
234 |processing-instruction()[not(preceding-sibling::listitem)]"/>
235 <fo:list-block id="{$id}" xsl:use-attribute-sets="list.block.spacing"
236 provisional-label-separation="0.2em" text-align="left">
237 <xsl:attribute name="provisional-distance-between-starts">
238 <xsl:choose>
239 <xsl:when test="$label-width != ''">
240 <xsl:value-of select="$label-width"/>
241 </xsl:when>
242 <xsl:otherwise>1.5em</xsl:otherwise>
243 </xsl:choose>
244 </xsl:attribute>
245 <xsl:apply-templates
246 select="listitem
247 |comment()[preceding-sibling::listitem]
248 |processing-instruction()[preceding-sibling::listitem]"/>
249 </fo:list-block>
250 </xsl:template>
251
252 <!-- Addibg a bullet, and left alignament, for packages and paches list. -->
253
254<xsl:template match="varlistentry" mode="vl.as.blocks">
255 <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>
256 <xsl:choose>
257 <xsl:when test="ancestor::variablelist/@role = 'materials'">
258 <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
259 keep-together.within-column="always"
260 keep-with-next.within-column="always" text-align="left">
261 <xsl:text>&#x2022; </xsl:text>
262 <xsl:apply-templates select="term"/>
263 </fo:block>
[1423d58f]264 <fo:block margin-left="1.4pc" text-align="left">
[3fe8b511]265 <xsl:apply-templates select="listitem"/>
266 </fo:block>
267 </xsl:when>
268 <xsl:otherwise>
269 <fo:block id="{$id}" xsl:use-attribute-sets="list.item.spacing"
270 keep-together.within-column="always"
271 keep-with-next.within-column="always">
272 <xsl:apply-templates select="term"/>
273 </fo:block>
274 <fo:block margin-left="0.25in">
275 <xsl:apply-templates select="listitem"/>
276 </fo:block>
277 </xsl:otherwise>
278 </xsl:choose>
279</xsl:template>
280
281</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.