source: stylesheets/pdf/lfs-pagesetup.xsl@ a2d4711a

Last change on this file since a2d4711a was a2d4711a, checked in by Manuel Canales Esparcia <manuel@…>, 19 years ago

Updated the stylesheets to use DocBook-XSL 168.1

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multi-arch/BOOK@4990 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.6 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 <!-- Header -->
8 <xsl:template name="header.content">
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>
21 </xsl:template>
22
23 <xsl:template name="header.table">
24 <xsl:param name="sequence" select="''"/>
25 <xsl:param name="gentext-key" select="''"/>
26 <xsl:choose>
27 <xsl:when test="$gentext-key = 'book' or $sequence = 'blank'"/>
28 <xsl:otherwise>
29 <xsl:call-template name="header.content">
30 <xsl:with-param name="sequence" select="$sequence"/>
31 </xsl:call-template>
32 </xsl:otherwise>
33 </xsl:choose>
34 </xsl:template>
35
36 <!-- Centered titles for book and part -->
37 <xsl:template name="book.titlepage">
38 <fo:block space-before="2in">
39 <fo:block>
40 <xsl:call-template name="book.titlepage.before.recto"/>
41 <xsl:call-template name="book.titlepage.recto"/>
42 </fo:block>
43 <fo:block>
44 <xsl:call-template name="book.titlepage.before.verso"/>
45 <xsl:call-template name="book.titlepage.verso"/>
46 </fo:block>
47 <xsl:call-template name="book.titlepage.separator"/>
48 </fo:block>
49 </xsl:template>
50
51 <xsl:template name="part.titlepage">
52 <fo:block>
53 <fo:block space-before="2.5in">
54 <xsl:call-template name="part.titlepage.before.recto"/>
55 <xsl:call-template name="part.titlepage.recto"/>
56 </fo:block>
57 <fo:block>
58 <xsl:call-template name="part.titlepage.before.verso"/>
59 <xsl:call-template name="part.titlepage.verso"/>
60 </fo:block>
61 <xsl:call-template name="part.titlepage.separator"/>
62 </fo:block>
63 </xsl:template>
64
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="body.start.indent" select="'0.7pc'"/>
80 <xsl:attribute-set name="normal.para.spacing">
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>
84 </xsl:attribute-set>
85 <xsl:attribute-set name="list.block.spacing">
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>
92 </xsl:attribute-set>
93 <xsl:attribute-set name="list.item.spacing">
94 <xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
95 <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
96 <xsl:attribute name="space-before.maximum">0.8em</xsl:attribute>
97 </xsl:attribute-set>
98 <xsl:attribute-set name="verbatim.properties">
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>
105 </xsl:attribute-set>
106
107 <!-- Others-->
108 <xsl:param name="header.rule" select="0"></xsl:param>
109 <xsl:param name="footer.rule" select="0"></xsl:param>
110 <xsl:param name="marker.section.level" select="-1"></xsl:param>
111
112 <!-- Dropping a blank page -->
113 <xsl:template name="book.titlepage.separator"/>
114
115
116</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.