-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlayout.xml
138 lines (135 loc) · 6.9 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
<Layout xmlns="urn:speedata.de:2009/publisher/en"
xmlns:sd="urn:speedata:2009/publisher/functions/en"
version="4.1.16">
<Pageformat height="14cm" width="8cm" />
<SetGrid nx="5" height="12pt" />
<LoadFontfile
name="Amiri-Regular"
filename="amiri-regular.ttf"
mode="harfbuzz" />
<DefineFontfamily fontsize="10" leading="12" name="amiri">
<Regular fontface="Amiri-Regular" />
</DefineFontfamily>
<DefineTextformat name="start" alignment="start" />
<DefineTextformat name="end" alignment="end" />
<Record element="data">
<SetVariable variable="directions">
<Element name="direction"><Attribute name="dir" select="''" /></Element>
<Element name="direction"><Attribute name="dir" select="'ltr'" /></Element>
<Element name="direction"><Attribute name="dir" select="'rtl'" /></Element>
</SetVariable>
<SetVariable variable="bidichoices">
<Element name="bidi"><Attribute name="bidi" select="'yes'" /></Element>
<Element name="bidi"><Attribute name="bidi" select="'no'" /></Element>
</SetVariable>
<SetVariable variable="examples">
<Element name="example">
<Attribute name="textformat" select="'text'" />
<Attribute name="visiblename" select="'justified'" />
</Element>
<Element name="example">
<Attribute name="textformat" select="'left'" />
<Attribute name="visiblename" select="'left'" />
</Element>
<Element name="example">
<Attribute name="textformat" select="'right'" />
<Attribute name="visiblename" select="'right'" />
</Element>
<Element name="example">
<Attribute name="textformat" select="'centered'" />
<Attribute name="visiblename" select="'centered'" />
</Element>
<Element name="example">
<Attribute name="textformat" select="'start'" />
<Attribute name="visiblename" select="'start'" />
</Element>
<Element name="example">
<Attribute name="textformat" select="'end'" />
<Attribute name="visiblename" select="'end'" />
</Element>
</SetVariable>
<ForAll select="$directions">
<SetVariable variable="direction" select="@dir"/>
<Switch>
<Case test="$direction = ''">
<SetVariable variable="visibledirection" select="'--'"/>
</Case>
<Otherwise>
<SetVariable variable="visibledirection" select="$direction"/>
</Otherwise>
</Switch>
<ForAll select="$bidichoices">
<SetVariable variable="bidi" select="@bidi"/>
<ForAll select="$examples/example">
<Switch>
<!-- set to true() to get vertical rules -->
<Case test="false()">
<Switch>
<Case test="@textformat = 'text' or @textformat = 'left'">
<PlaceObject allocate="no">
<Rule direction="vertical" length="{sd:number-of-rows() - 6}" color="lightgray" />
</PlaceObject>
</Case>
</Switch>
<Switch>
<Case test="@textformat = 'text' or @textformat = 'right'">
<PlaceObject column="{sd:number-of-columns()}" allocate="no" halign="right">
<Rule direction="vertical" length="{sd:number-of-rows() - 6}" color="lightgray" />
</PlaceObject>
</Case>
</Switch>
<Switch>
<Case test="@textformat = 'centered'">
<PlaceObject column="{sd:number-of-columns() idiv 2 + 1}" allocate="no" halign="center">
<Rule direction="vertical" length="{sd:number-of-rows() - 6}" color="lightgray" />
</PlaceObject>
</Case>
</Switch>
</Case>
</Switch>
<PlaceObject>
<Textblock>
<Bookmark level="1" select="concat($visibledirection,', bidi: ', $bidi, ' ', @visiblename)" />
<Paragraph>
<Value select="concat('Align: ', @visiblename, ', direction: ',$visibledirection, ', bidi: ', $bidi)"/>
</Paragraph>
</Textblock>
</PlaceObject>
<NextRow />
<PlaceObject column="1">
<Textblock width="5">
<Paragraph textformat="{@textformat}" direction="{$direction}" bidi="{$bidi}">
<Value select="sd:dummytext()"></Value>
</Paragraph>
</Textblock>
</PlaceObject>
<NextRow />
<PlaceObject column="1">
<Textblock width="5">
<Paragraph textformat="{@textformat}" fontfamily="amiri" direction="{$direction}" bidi="{$bidi}">
<Value>المادة 1 يولد جميع الناس أحرارًا متساوين في الكرامة والحقوق. وقد وهبوا عقلاً وضميرًا وعليهم أن يعامل بعضهم بعضًا بروح الإخاء.</Value>
</Paragraph>
</Textblock>
</PlaceObject>
<NextRow />
<PlaceObject>
<Textblock>
<Paragraph>
<Value>No direction setting:</Value>
</Paragraph>
</Textblock>
</PlaceObject>
<NextRow />
<PlaceObject column="1">
<Textblock fontfamily="amiri" width="5" textformat="{@textformat}" >
<Paragraph bidi="{$bidi}" >
<Value>العاشر ليونيكود (Unicode Conference)، الذي سيعقد في 10-12 آذار 1997 مبدينة</Value>
</Paragraph>
</Textblock>
</PlaceObject>
<ClearPage />
</ForAll>
</ForAll>
</ForAll>
</Record>
</Layout>