-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.xml
More file actions
151 lines (143 loc) · 4.93 KB
/
layout.xml
File metadata and controls
151 lines (143 loc) · 4.93 KB
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
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en">
<!-- Grundeinstellungen, Seitenformat und Schriftarten -->
<Options mainlanguage="German" />
<Pageformat width="297mm" height="210mm" />
<SetVariable variable="orphan_threshold" select="3" />
<!--
Noto ist eine der wenigen proportionalen Schriftarten, die die Ziffer "0" mit einem
Querstrich enthalten, um sie eindeutig von einem großen "O" unterscheiden zu können.
https://fonts.google.com/noto
-->
<LoadFontfile name="NotoSans-Regular"
filename="NotoSans-Regular.ttf"
mode="harfbuzz" />
<LoadFontfile name="NotoSans-Bold"
filename="NotoSans-Bold.ttf"
mode="harfbuzz" />
<DefineFontfamily name="header" fontsize="9" leading="11">
<Regular fontface="NotoSans-Regular" />
</DefineFontfamily>
<DefineFontfamily name="title" fontsize="10" leading="12">
<Regular fontface="NotoSans-Bold" />
</DefineFontfamily>
<DefineFontfamily name="text" fontsize="10" leading="12">
<Regular fontface="NotoSans-Regular" />
</DefineFontfamily>
<DefineFontfamily name="footer" fontsize="9" leading="11">
<Regular fontface="NotoSans-Regular" />
</DefineFontfamily>
<!-- Layout-Bereiche -->
<Pagetype name="page" test="true()">
<Margin left="10mm" right="10mm" top="10mm" bottom="10mm" />
<Grid nx="32" ny="20" />
<PositioningArea name="content">
<PositioningFrame width="10" height="19" row="2" column="1" />
<PositioningFrame width="10" height="19" row="2" column="12" />
<PositioningFrame width="10" height="19" row="2" column="23" />
</PositioningArea>
<AtPageCreation>
<PlaceObject row="1" column="1">
<Table fontfamily="header" stretch="max">
<Columns>
<Column align="left" width="1*" />
<Column align="center" width="2*" />
<Column align="right" width="1*" />
</Columns>
<Tr>
<Td>
<Paragraph>
<Value>Amateurfunk Cheat Sheet V</Value>
<Value select="$version" />
</Paragraph>
</Td>
<Td>
<Paragraph>
<Value select="if (sd:variable-exists('eigene_kennung')) then $eigene_kennung else ''" />
</Paragraph>
</Td>
<Td>
<Paragraph>
<Value>2023 Steffen Beyer</Value>
</Paragraph>
</Td>
</Tr>
<!-- unsichtbare Linie als Abstandshalter -->
<Tablerule rulewidth="0.6pt" color="-" />
<!-- Trennlinie unter dem Kopfbereich -->
<Tablerule rulewidth="0.6pt" />
</Table>
</PlaceObject>
</AtPageCreation>
</Pagetype>
<!-- Inhalte -->
<Record element="data">
<!-- Tabellen -->
<ProcessNode select="*" />
<!-- Anhang: Inhaltsabhängiger Hash-Code und Datum der Erzeugung -->
<PlaceObject area="content">
<Textblock fontfamily="footer" textformat="right">
<Paragraph>
<Value>Hash-Code: </Value>
<Value select="sd:md5(string-join(., '|'))" />
</Paragraph>
<Paragraph>
<Value>Datum: </Value>
<Value select="@build-date" />
</Paragraph>
</Textblock>
</PlaceObject>
</Record>
<Record element="table">
<!-- Variable ist hier notwendig als Workaround (sp v4.14.0/4.15.4, s.a.
https://github.com/speedata/publisher/issues/517#issuecomment-1727546346 -->
<SetVariable variable="rows_left"
select="sd:number-of-rows('content') - sd:current-row('content')" />
<Switch>
<Case test="$rows_left < $orphan_threshold">
<NextFrame area="content" />
</Case>
</Switch>
<PlaceObject area="content">
<Textblock fontfamily="title">
<Paragraph>
<Value select="@title" />
</Paragraph>
</Textblock>
</PlaceObject>
<PlaceObject area="content">
<Table padding="2pt" stretch="max">
<ForAll select="row">
<Switch>
<Case test="position() = 1">
<Tablehead>
<Tr valign="top" backgroundcolor="#ddd">
<ForAll select="cell">
<Td border-bottom="0.6pt">
<Paragraph>
<Value select="." />
</Paragraph>
</Td>
</ForAll>
</Tr>
</Tablehead>
</Case>
<Otherwise>
<Tr valign="top">
<ForAll select="cell">
<Td>
<Paragraph>
<Value select="." />
</Paragraph>
</Td>
</ForAll>
</Tr>
</Otherwise>
</Switch>
</ForAll>
<!-- Mindestabstand unter Tabelle erzwingen -->
<Tablerule rulewidth="3mm" color="-" />
</Table>
</PlaceObject>
</Record>
</Layout>