-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
layout.xml
158 lines (147 loc) · 6.52 KB
/
layout.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<Layout
xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en"
version="2.9.7">
<Options ignoreeol="yes" mainlanguage="English (Great Britain)"/>
<SetGrid height="10pt" nx="20"/>
<Pagetype name="title" test="sd:current-page() = 1">
<Margin left="1cm" right="1cm" top="1cm" bottom="1cm"></Margin>
<AtPageShipout>
<PlaceObject row="{sd:number-of-rows()}" column="1" allocate="no">
<Table stretch="max">
<Tr>
<Td align="left">
<Paragraph><Value select="sd:current-page()"/><Value> – Sample journal</Value></Paragraph>
</Td>
</Tr>
</Table>
</PlaceObject>
</AtPageShipout>
</Pagetype>
<Pagetype name="text" test="sd:current-page() > 1">
<Margin left="1cm" right="1cm" top="1cm" bottom="1cm"></Margin>
<PositioningArea name="text">
<PositioningFrame width="10" height="{sd:number-of-rows() - 3}" row="1" column="1"/>
<PositioningFrame width="10" height="{sd:number-of-rows() - 3}" row="1" column="12"/>
</PositioningArea>
<PositioningArea name="img">
<PositioningFrame width="10" height="{sd:number-of-rows() - 3}" row="1" column="23"/>
</PositioningArea>
<!-- Grid height page 1 is 10pt, height on page 2 is 12pt -->
<Grid nx="32" height="12pt"/>
<AtPageShipout>
<PlaceObject row="{sd:number-of-rows()}" column="1">
<Table stretch="max">
<Tr>
<Switch>
<Case test="sd:odd(sd:current-page())">
<Td align="left">
<Paragraph><Value select="sd:current-page()"/><Value> – Sample journal</Value></Paragraph>
</Td>
</Case>
<Otherwise>
<Td align="right">
<Paragraph><Value>Sample journal – </Value><Value select="sd:current-page()"/></Paragraph>
</Td>
</Otherwise>
</Switch>
</Tr>
</Table>
</PlaceObject>
</AtPageShipout>
</Pagetype>
<DefineTextformat name="right" alignment="rightaligned"/>
<DefineTextformat name="left" alignment="leftaligned"/>
<DefineTextformat name="partitle" alignment="leftaligned" padding-top="15pt" margin-bottom="8pt"/>
<LoadFontfile name="B" filename="FiraSans-Bold.otf" />
<LoadFontfile name="R" filename="FiraSans-Regular.otf" />
<DefineFontfamily name="initial" fontsize="23" leading="23">
<Regular fontface="B"/>
</DefineFontfamily>
<DefineFontfamily name="BigHeading" fontsize="25" leading="34">
<Regular fontface="B"/>
</DefineFontfamily>
<DefineFontfamily name="intro" fontsize="12" leading="16">
<Regular fontface="R"/>
<Bold fontface="B"/>
</DefineFontfamily>
<DefineFontfamily name="text" fontsize="10" leading="12">
<Regular fontface="R"/>
<Bold fontface="B"/>
</DefineFontfamily>
<DefineFontfamily name="caption" fontsize="8" leading="10">
<Regular fontface="B"/>
</DefineFontfamily>
<Record element="data">
<PlaceObject column="1" row="1">
<Image file="{@titleimage}" width="{sd:number-of-columns()}"/>
</PlaceObject>
<PlaceObject column="{sd:number-of-columns()}" hreference="right" row="{sd:current-row()}">
<Textblock width="10" textformat="right"><Paragraph><Value select="titleimage/@title"></Value></Paragraph></Textblock>
</PlaceObject>
<NextRow rows="1"/>
<PlaceObject>
<Table padding="2pt">
<Tr backgroundcolor="black">
<Td><Paragraph color="white"><Value select="@author"></Value></Paragraph></Td>
</Tr>
</Table>
</PlaceObject>
<NextRow/>
<NextRow/>
<PlaceObject column="1">
<Textblock fontfamily="BigHeading" textformat="left" width="{sd:number-of-columns() - 6}">
<Paragraph>
<Value select="@title"/>
</Paragraph>
</Textblock>
</PlaceObject>
<NextRow />
<NextRow />
<NextRow />
<PlaceObject column="9">
<Textblock fontfamily="intro" textformat="left" width="{sd:number-of-columns() - 8}">
<Paragraph><B><Value select="string(intro)"></Value></B></Paragraph>
</Textblock>
</PlaceObject>
<ClearPage/>
<ForAll select="images/img">
<PlaceObject row="{@y}" column="{@x}">
<Image width="{@width}" file="{@filename}"/>
</PlaceObject>
<PlaceObject column="{@caption_x}">
<Textblock width="8" textformat="left"><Paragraph fontfamily="caption"><Value select="@caption"/></Paragraph></Textblock>
</PlaceObject>
</ForAll>
<PlaceObject row="{sd:number-of-rows('text')}" vreference="bottom" column="1" valign="bottom" keepposition="yes">
<!-- http://wikitravel.org/en/File:1220084-Bel_m-Lisbon.jpg -->
<Image width="21" file="1220084-Bel_m-Lisbon.jpg"/>
</PlaceObject>
<SetVariable variable="currentrow" select="1"/>
<ForAll select="text/par">
<SetVariable variable="currentrow" select="sd:current-row('text')"/>
<Switch>
<Case test="not(empty(@title))">
<PlaceObject area="text">
<Textblock textformat="partitle">
<Paragraph>
<B><Value select="@title"/></B>
</Paragraph>
</Textblock>
</PlaceObject>
</Case>
</Switch>
<Output area="text" row="{$currentrow}" allocate="auto">
<Text>
<Paragraph>
<Switch>
<Case test="not(empty(@initial))">
<Initial fontfamily="initial" padding-right="2pt"><Value select="@initial"/></Initial>
</Case>
</Switch>
<Value select="."/></Paragraph>
</Text>
</Output>
</ForAll>
</Record>
</Layout>