1 <?xml version="1.0" encoding="utf-8"?>
\r
3 Copyright © 2009,2010 Łukasz Rekucki
\r
5 This file is part of WL2PDF
\r
7 WL2PDF is free software: you can redistribute it and/or modify
\r
8 it under the terms of the GNU Affero General Public License as published by
\r
9 the Free Software Foundation, either version 3 of the License, or
\r
10 (at your option) any later version.
\r
12 WL2PDF is distributed in the hope that it will be useful,
\r
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 GNU Affero General Public License for more details.
\r
17 You should have received a copy of the GNU Affero General Public License
\r
18 along with WL2PDF. If not, see <http://www.gnu.org/licenses/>.
\r
23 xmlns:wlml="http://nowoczesnapolska.org.pl/ML/Lektury/1.1"
\r
25 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
\r
26 xmlns:fo="http://www.w3.org/1999/XSL/Format"
\r
27 xmlns:wl="http://wolnelektury.pl/functions" >
\r
29 <xsl:template name="layout-masters">
\r
31 <fo:layout-master-set>
\r
32 <!-- layout information -->
\r
33 <fo:simple-page-master
\r
34 master-name="title-page"
\r
35 page-height="29.7cm"
\r
38 margin-bottom="2.5cm"
\r
40 margin-right="2.5cm">
\r
42 </fo:simple-page-master>
\r
44 <fo:simple-page-master
\r
45 master-name="blank-page"
\r
46 page-height="29.7cm"
\r
50 margin-bottom="2.5cm"
\r
52 margin-right="2.5cm">
\r
54 </fo:simple-page-master>
\r
56 <fo:simple-page-master
\r
57 master-name="first-main"
\r
58 page-height="29.7cm"
\r
66 margin-bottom="2cm" />
\r
68 region-name="odd-after"
\r
69 display-align="after"
\r
71 </fo:simple-page-master>
\r
73 <fo:simple-page-master
\r
75 page-height="29.7cm"
\r
83 margin-bottom="2cm" />
\r
86 region-name="odd-before"
\r
90 region-name="odd-after"
\r
91 display-align="after"
\r
93 </fo:simple-page-master>
\r
95 <fo:simple-page-master
\r
97 page-height="29.7cm"
\r
100 margin-bottom="2cm"
\r
102 margin-right="3cm">
\r
105 margin-bottom="2cm" />
\r
108 region-name="even-before"
\r
112 region-name="even-after"
\r
113 display-align="after"
\r
115 </fo:simple-page-master>
\r
118 <fo:page-sequence-master master-name="book-titles">
\r
119 <fo:single-page-master-reference master-reference="title-page" />
\r
120 <fo:repeatable-page-master-reference master-reference="blank-page" />
\r
121 </fo:page-sequence-master>
\r
123 <fo:page-sequence-master master-name="main">
\r
124 <fo:repeatable-page-master-alternatives>
\r
125 <fo:conditional-page-master-reference
\r
126 master-reference="first-main"
\r
127 page-position="first"
\r
128 odd-or-even="odd" />
\r
130 <fo:conditional-page-master-reference
\r
131 master-reference="odd"
\r
132 page-position="rest"
\r
133 odd-or-even="odd" />
\r
135 <fo:conditional-page-master-reference
\r
136 master-reference="even"
\r
137 page-position="any"
\r
138 odd-or-even="even" />
\r
139 </fo:repeatable-page-master-alternatives>
\r
141 </fo:page-sequence-master>
\r
143 </fo:layout-master-set>
\r
145 <!-- end: defines page layout -->
\r
148 <xsl:template name="title-page">
\r
150 <fo:flow flow-name="xsl-region-body"
\r
151 font-family="DejaVu Serif" text-align="center">
\r
153 <fo:block font-size="32pt" display-align="center" >
\r
154 <fo:marker marker-class-name="author">
\r
155 <xsl:value-of select="//wlml:author" />
\r
157 <xsl:apply-templates select="//wlml:author/node()" mode="title"/>
\r
160 <fo:block font-size="48pt" display-align="center" >
\r
161 <fo:marker marker-class-name="main-title">
\r
162 <xsl:value-of select="//wlml:title" />
\r
164 <xsl:apply-templates select="//wlml:title/node()" mode="title"/>
\r