source: stylesheets/print/lfs-pagesetup.xsl@ e119983

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

Ported the last changes in the stylesheets from trunk to testing.

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