1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
"DTD/xhtml1-transitional.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml">
5
<!-- XML file produced from file: manual.tex
6
using Hyperlatex v 2.6 (c) Otfried Cheong
7
on Emacs 22.2.1, Wed Dec 9 15:44:23 2009 -->
9
<title>Ipe Manual -- 9.4 The <ipestyle> element</title>
11
<style type="text/css">
12
.maketitle { text-align : center }
13
div.abstract { margin-left: 20%; margin-right: 10%; }
14
h3.abstract { text-align : center }
15
div.verse, div.quote, div.quotation {
21
<link rel="stylesheet"
22
href="manual.css" type="text/css"><meta http-equiv="Content-Type"
23
content="text/html; charset=UTF-8">
25
<body bgcolor="#ffffe6">
26
<table width="100%" cellpadding=0 cellspacing=2><tr>
27
<td bgcolor="#99ccff"><img alt="" src="blank.png"></td><td bgcolor="#99ccff"><a href="manual_41.html"><img border="0" alt="9 The Ipe file format" src="up.png"></a></td><td bgcolor="#99ccff"><a href="manual_44.html"><img border="0" alt="9.3 Ipe object elements" src="previous.png"></a></td><td align="center" bgcolor="#99ccff" width="100%"><b>9.4 The <tt><ipestyle></tt> element</b></td></tr></table>
28
<h2>9.4 The <tt><ipestyle></tt> element</h2>
30
<h4><a name="id1">Attributes</a></h4>
31
<dl><dt><b>name</b><dd> (optional) The name serves to identify the style sheet
32
informally, and can be used to automatically update the style sheet
33
from a file with the matching name.
35
<p>The contents of the <code><ipestyle></code> element is a series of style
36
definition elements, in no particular order. These elements are
39
<h3><a name="id2">9.4.1 The <tt><symbol></tt> element</a></h3>
41
<h4><a name="id3">Attributes</a></h4>
42
<dl><dt><b>name</b><dd> (required) The name identifies the symbol and must
43
be unique in the style sheet. For parameterized symbols, the name
44
must end with the pattern "(s?f?p?x?)", where "s" stands for
45
stroke, "f" for fill, "p" for pen, and "x" for size.
46
<dt><b>transformations</b><dd> (optional) As for objects.
47
<dt><b>xform</b><dd> (optional) If this attribute is set, a PDF XForm will be
48
created for this symbol when saving or exporting to PDF. It implies
49
<code>transformations="translations"</code>, and will be ignored if
50
any of the symbol parameters (that is, stroke, fill, pen, or size)
51
are used. Setting this attribute will cause the PDF output to be
52
significantly smaller for a complicated symbol that is used often
53
(for instance, a complicated background used on every page).
55
<p>The contents of the <code><symbol></code> element is a single Ipe object.
57
<h3><a name="id4">9.4.2 The <tt><preamble></tt> element</a></h3>
58
<p>See the <tt><preamble></tt> elements inside <code><ipe></code> elements.
60
<h3><a name="id5">9.4.3 The <tt><cmap></tt> element</a></h3>
62
<h4><a name="id6">Attributes</a></h4>
63
<dl><dt><b>font</b><dd> (required) The name of a font. The font is marked as
64
being Unicode-encoded. See <a href="manual_39.html">here</a>
68
<h3><a name="id7">9.4.4 The <tt><textstyle></tt> element</a></h3>
70
<h4><a name="id8">Attributes</a></h4>
71
<dl><dt><b>name</b><dd> (required) The symbolic name (to be used in the <code>style</code>
72
attribute of <code><text></code> elements),
73
<dt><b>begin</b><dd> (required) LaTeX code to be placed before the text of
74
the object when it is formatted,
75
<dt><b>end</b><dd> (required) LaTeX code to be placed after the text of
76
the object when it is formatted.
79
<h3><a name="id9">9.4.5 The <tt><layout></tt> element</a></h3>
80
<p>It defines the layout of the frame on the paper and the paper size.
82
<h4><a name="id10">Attributes</a></h4>
83
<dl><dt><b>paper</b><dd> (required) The size of the paper.
84
<dt><b>origin</b><dd> (required) The lower left corner of the frame
85
in the paper coordinate system.
86
<dt><b>frame</b><dd> (required) The size of the frame.
87
<dt><b>skip</b><dd> (optional) The default paragraph skip between textboxes.
88
<dt><b>crop</b><dd> (optional) If the value of <code>crop</code> is <code>yes</code>, Ipe
89
will create a <code>CropBox</code> attribute when saving to PDF.
92
<h3><a name="id11">9.4.6 The <tt><titlestyle></tt> element</a></h3>
93
<p>It defines the appearance of the page title on the page.
95
<h4><a name="id12">Attributes</a></h4>
96
<dl><dt><b>pos</b><dd> (required) The position of the title reference point in the
97
frame coordinate system.
98
<dt><b>color</b><dd> (required) The color of the title.
99
<dt><b>size</b><dd> (required) The title font size (same as for <code><text></code>
101
<dt><b>halign</b><dd> (optional) The horizontal alignment (same as for <code><text></code>
103
<dt><b>valign</b><dd> (optional) The vertical alignment (same as for <code><text></code>
107
<h3><a name="id13">9.4.7 The <tt><pagenumberstyle></tt> element</a></h3>
108
<p>It defines the appearance of page numbers on the page.
110
<h4><a name="id14">Attributes</a></h4>
111
<dl><dt><b>pos</b><dd> (required) The position of the page number on the page.
112
<dt><b>color</b><dd> (required) The color of the page number as an absolute color.
113
<dt><b>size</b><dd> (required) The font size as a number.
116
<h3><a name="id15">9.4.8 The <tt><pathstyle></tt> element</a></h3>
117
<p>It defines the default setting for path objects.
119
<h4><a name="id16">Attributes</a></h4>
120
<dl><dt><b>cap</b><dd> (optional) Same as for <code><path></code> elements.
121
<dt><b>join</b><dd> (optional) Same as for <code><path></code> elements.
122
<dt><b>fillrule</b><dd> (optional) Same as for <code><path></code> elements.
125
<h3><a name="id17">9.4.9 The <tt><opacity></tt> element</a></h3>
126
<p>The <code>opacity</code> element defines a possible opacity value (also
127
known as an alpha-value). All opacity values used in a document must
128
be defined in the style sheet.
130
<h4><a name="id18">Attributes</a></h4>
131
<dl><dt><b>name</b><dd> (required) A symbolic name, to be used in the
132
<code>opacity</code> attribute of a <code>text</code> or <code>path</code> element.
133
<dt><b>value</b><dd> (required) An absolute value for the opacity, between
134
0.001 and 1.000. A value of 1.0 implies that the element is fully
138
<h3><a name="id19">9.4.10 The <tt><gradient></tt> element</a></h3>
140
<p>The <code>gradient</code> element defines a gradient pattern.
142
<h4><a name="id20">Attributes of <code><gradient></code></a></h4>
143
<dl><dt><b>name</b><dd> (required) The symbolic name (to be used in the
144
<code>gradient</code> attribute of <code><path></code> elements).
145
<dt><b>type</b><dd> (required) Possible values are
146
<code>axial</code> and <code>radial</code>.
147
<dt><b>extend</b><dd> (optional) <code>yes</code> or <code>no</code> (the default).
148
Indicates whether the gradient is extended beyond the boundaries.
149
<dt><b>coords</b><dd> (required) For axial shading: the coordinates of the
150
endpoints of the axis (in the order <code>x1 y1 x2 y2</code>). For radial
151
shading: the center and radius of both circles (in the order
152
<code>cx1 cy1 r1 cx2 cy2 r2</code>).
153
<dt><b>matrix</b><dd> (optional) A transformation that transforms the gradient
154
coordinate system into the coordinate system of the path object
155
using the gradient. The default is the identity matrix.
157
<p>The contents of the <code><gradient></code> element are <code><stop></code>
158
elements defining the color stops of the gradient. There must be at
159
least two stops. Stops must be defined in increasing offset order.
160
It is not necessary that the first offset is 0.0 and the last one
163
<h4><a name="id21">Attributes of <code><stop></code></a></h4>
164
<dl><dt><b>offset</b><dd> (required) Offset of the color stop (a number between
166
<dt><b>color</b><dd> (required) Color at this color stop (three
167
numbers). Symbolic names are not allowed.
170
<h3><a name="id22">9.4.11 The <tt><tiling></tt> element</a></h3>
171
<p>The <code>tiling</code> element defines a tiling pattern. Only very simple
172
patterns that hatch the area with a line are supported.
174
<h4><a name="id23">Attributes</a></h4>
175
<dl><dt><b>name</b><dd> (required) The symbolic name (to be used in the <code>tiling</code>
176
attribute of <code><path></code> elements).
177
<dt><b>angle</b><dd> (required) Slope of the hatching line in degrees, between
179
<dt><b>width</b><dd> (required) Width of the hatching line.
180
<dt><b>step</b><dd> (required) Distance from one hatching line to the next.
182
<p>Here, <code>width</code> and <code>step</code> are measured in the <i>y</i>-direction
183
if the absolute value of <code>angle</code> is less than 45 degrees, and in
184
the <i>y</i>-direction otherwise.
186
<h3><a name="id24">9.4.12 The <tt><effect></tt> element</a></h3>
187
<p>The <code>effect</code> element defines a graphic effect to be used during a
188
PDF page transition. Acrobat Reader supports these effects, but not
191
<h4><a name="id25">Attributes</a></h4>
192
<dl><dt><b>name</b><dd> (required) The symbolic name (to be used in the <code>effect</code>
193
attribute of <code><view></code> elements).
194
<dt><b>duration</b><dd> (required) Value must be a real number, indicating the
195
duration of display in seconds.
196
<dt><b>transition</b><dd> (required) Value must be a real number, indicating the
197
duration of the transition effect in seconds.
198
<dt><b>effect</b><dd> (required) a number indicated the desired effect. The
199
value must be an integer between 0 and 16 (see
200
<code>ipe::Effect::TEffect</code> for the exact meaning).
203
<h3><a name="id26">9.4.13 Other style definition elements</a></h3>
204
<p>The remaining style definition elements are:
205
<ul><li><code><color></code> Defines a symbolic color. The value must be an
206
absolute color, that is either a single gray value (between 0 and
207
1), or three components (red, green, blue) seperated by space.
208
<li><code><dashstyle></code> Defines a symbolic dashstyle. The value must
209
be a correct dashstyle description, e.g. <code>[3 5 2 5] 0</code>.
210
<li><code><pen></code> Defines a symbolic pen width. The value is a single
212
<li><code><textsize></code> Defines a symbolic text size. The value is a
213
piece of LaTeX source code selecting the desired font size.
214
<li><code><textstretch></code> Defines a symbolic text stretch factor. The
215
symbolic name is shared with <code><textsize></code> elements. The value
216
is a single real number.
217
<li><code><symbolsize></code> Defines a symbolic size for symbols. The value
218
is a single real number, and indicates the scaling factor used for
220
<li><code><arrowsize></code> Defines a symbolic size for arrows. The value
221
is a single real number.
222
<li><code><grid></code> Defines a grid size. The symbolic name cannot
223
actually be used by objects in the document -- it is only used to
224
fill the grid size selector in the user interface.
225
<li><code><angle></code> Defines an angular snap angle. The symbolic name cannot
226
actually be used by objects in the document -- it is only used to
227
fill the angle selector in the user interface.
230
<h4><a name="id27">Common attributes</a></h4>
231
<dl><dt><b>name</b><dd> (required) A symbolic name, which must start with a
232
letter 'a' to 'z' or 'A' to 'Z'.
233
<dt><b>value</b><dd> (required) A legal absolute value for the type of
237
<table width="100%" cellpadding=0 cellspacing=2><tr>
238
<td bgcolor="#99ccff"><img alt="" src="blank.png"></td><td bgcolor="#99ccff"><a href="manual_41.html"><img border="0" alt="9 The Ipe file format" src="up.png"></a></td><td bgcolor="#99ccff"><a href="manual_44.html"><img border="0" alt="9.3 Ipe object elements" src="previous.png"></a></td><td align="center" bgcolor="#99ccff" width="100%"><b>9.4 The <tt><ipestyle></tt> element</b></td></tr></table></body></html>