source: stylesheets/pdf/lfs-sections.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: 3.7 KB
Line 
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
7<!--
8$LastChangedBy$
9$Date$
10-->
11
12 <!-- Force section1's onto a new page -->
13 <xsl:attribute-set name="section.level1.properties">
14 <xsl:attribute name="break-after">
15 <xsl:choose>
16 <xsl:when test="not(position()=last())">
17 <xsl:text>page</xsl:text>
18 </xsl:when>
19 <xsl:otherwise>
20 <xsl:text>auto</xsl:text>
21 </xsl:otherwise>
22 </xsl:choose>
23 </xsl:attribute>
24 </xsl:attribute-set>
25
26 <!-- Sections numbering -->
27 <xsl:param name="section.autolabel" select="0"/>
28 <xsl:param name="section.label.includes.component.label" select="0"/>
29
30 <!-- Skip numeraration for sections with empty title -->
31 <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
32 <xsl:if test="string-length(title) > 0">
33 <!-- label the parent -->
34 <xsl:variable name="parent.label">
35 <xsl:apply-templates select=".." mode="label.markup"/>
36 </xsl:variable>
37 <xsl:if test="$parent.label != ''">
38 <xsl:apply-templates select=".." mode="label.markup"/>
39 <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
40 </xsl:if>
41 <xsl:choose>
42 <xsl:when test="@label">
43 <xsl:value-of select="@label"/>
44 </xsl:when>
45 <xsl:when test="$section.autolabel != 0">
46 <xsl:choose>
47 <xsl:when test="local-name(.) = 'sect2'">
48 <xsl:choose>
49 <!-- If the first sect2 isn't numbered, renumber the remainig sections -->
50 <xsl:when test="string-length(../sect2[1]/title) = 0">
51 <xsl:variable name="totalsect2">
52 <xsl:number count="sect2"/>
53 </xsl:variable>
54 <xsl:number value="$totalsect2 - 1"/>
55 </xsl:when>
56 <xsl:otherwise>
57 <xsl:number count="sect2"/>
58 </xsl:otherwise>
59 </xsl:choose>
60 </xsl:when>
61 <xsl:when test="local-name(.) = 'sect3'">
62 <xsl:number count="sect3"/>
63 </xsl:when>
64 <xsl:when test="local-name(.) = 'sect4'">
65 <xsl:number count="sect4"/>
66 </xsl:when>
67 <xsl:when test="local-name(.) = 'sect5'">
68 <xsl:number count="sect5"/>
69 </xsl:when>
70 <xsl:otherwise>
71 <xsl:message>label.markup: this can't happen!</xsl:message>
72 </xsl:otherwise>
73 </xsl:choose>
74 </xsl:when>
75 </xsl:choose>
76 </xsl:if>
77 </xsl:template>
78
79 <!-- Drop the trailing punctuation if title is empty -->
80 <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
81 |bridgehead"
82 mode="object.title.template">
83 <xsl:choose>
84 <xsl:when test="$section.autolabel != 0">
85 <xsl:if test="string-length(title) > 0">
86 <xsl:call-template name="gentext.template">
87 <xsl:with-param name="context" select="'title-numbered'"/>
88 <xsl:with-param name="name">
89 <xsl:call-template name="xpath.location"/>
90 </xsl:with-param>
91 </xsl:call-template>
92 </xsl:if>
93 </xsl:when>
94 <xsl:otherwise>
95 <xsl:call-template name="gentext.template">
96 <xsl:with-param name="context" select="'title-unnumbered'"/>
97 <xsl:with-param name="name">
98 <xsl:call-template name="xpath.location"/>
99 </xsl:with-param>
100 </xsl:call-template>
101 </xsl:otherwise>
102 </xsl:choose>
103 </xsl:template>
104
105</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.