![]() | ![]() | ![]() | 14.4 The Ipe style sheet format |
Style sheets can either be embedded in an Ipe document, or reside in
a separate file. Separate files can start with the optional
<?xml>
tag.
The style sheet itself consists of the single element
<ipestyle>
. It takes the optional attribute name
, which
only serves to identify the style sheet informally.
The contents of the style sheet element can consist of the following elements:
template
, color
, dashstyle
, linewidth
,
textsize
, marksize
, arrowsize
,
grid
, angle
, media
, preamble
,
textstretch
, margins
, and shading
.
The template
element takes a required attribute name
,
which identifies the template and must be unique in the style
sheet. Its contents is a single Ipe object.
The contents of the preamble
element defines a (piece of)
LaTeX-preamble.
The margins
element takes the two required attributes tl
and br
, for the top-left and bottom-right margins of the
standard text area on the page.
The shading
element sets the background shading of a PDF page.
Its required attributes are type
(with the possible values
axial
and radial
), colora
and colorb
(the
two extreme colors that are being interpolated), extend
(two
integer flags, indicating whether to extend the shading to the full
page), and coords
(for axial shading, the coordinates of the
endpoints of the axis, for radial shading, the center and radius of
both circles). The shading will be applied to every PDF page, before
anything else is drawn on it. It is completely invisible in the Ipe
user interface, so use this it with care.
All other elements have empty contents and two required attributes,
name
and value
. name
defines a symbolic name,
value
an absolute value. The symbolic name must start with a
letter 'a' to 'z' or 'A' to 'Z'. The value for the color
and
dashstyle
elements must be a legal absolute value for the Ipe
object attributes of the same name. The value for linewidth
,
textsize
, marksize
, arrowsize
, grid
, and
angle
must be single real number. The value for media
must be two integers (width and height in Postscript points, i.e. 1/72
inch), separated by white space. The value for textstretch
must
be two real numbers (stretch in horizontal and vertical direction).
Note that the symbolic names for grid
, angle
, and
media
cannot actually be used by objects in the document--they
are only used to fill the grid size, angular snap angle, and page size
selectors in the user interface with values.
![]() | ![]() | ![]() | 14.4 The Ipe style sheet format |