9.2 The <page> element9 The Ipe file format9.1 The <ipe> element

9.1 The <ipe> element

Attributes

version
(required) The value (a number, e.g. 70103 for Ipelib 7.1.3) indicates the earliest Ipelib version that can interpret the document. Ipe will refuse to load documents that require a version larger than its own, and may refuse to load documents that are too old (and which will have to be converted using a separate program).
creator
(optional) indicates the program that created the file and is not interpreted by Ipe at all.

Contents

  1. An <info> element (optional),
  2. a <preamble> element (optional),
  3. a series of <bitmap> and <ipestyle> elements (optional),
  4. a series of page elements.

The <ipestyle> elements form a "cascade", with the last <ipestyle> element becoming the top-level style sheet. When symbolic names are looked up, the style sheets are checked from top to bottom. Ipe always appends the built-in standard style sheet at the bottom of the stack.

9.1.1 The <info> element

Attributes

title
(optional) document title,
author
(optional) document author,
subject
(optional) document subject,
keywords
(optional) document keywords,
pagemode
(optional) the only value understood by Ipe is fullscreen, which causes the document to be opened in full screen mode in PDF readers.
created
(optional) creation time in PDF format, e.g. "D:20030127204100".
modified
(optional) modification time in PDF format,
numberpages
(optional) if the value is yes, then Ipe will save PDF documents with visible page numbers on each page.
tex
(optional) determines the TeX-engine used to translate your text. The possible values are pdftex, xetex, and luatex.

This element must be empty.

9.1.2 The <preamble> element

The contents of this element is LaTeX source code, to be used as the LaTeX preamble when running LaTeX to process the text objects in the document. It should not contain a \documentclass command, but can contain \usepackage commands and macro definitions.

9.1.3 The <bitmap> element

Each <bitmap> element defines a bitmap to be used by <image> objects.

Attributes

id
(required) the value must be an integer that will define the bitmap throughout the Ipe document,
width
(required) integer width in pixels,
height
(required) integer height in pixels,
ColorSpace
(optional) possible values are "DeviceGray", "DeviceGrayAlpha", "DeviceRGB" (default value), and "DeviceRGBAlpha". The suffix "Alpha" indicates the presence of an alpha channel.
ColorKey
(optional) an RGB color in hexadecimal, indicating the transparent color (not supported for JPEG images and for images with alpha channel),
length
(required unless there is no filter and no alpha channel) the number of bytes of image data,
Filter
(optional) possible values are "FlateDecode" or "DCTDecode" to indicate a compressed image (the latter is used for JPEG images),
encoding
(optional) possible value is "base64" to indicate that the image data is base64-encoded (not in hexadecimal),
alphaLength
(optional) indicates that the alpha channel is provided separately.

The contents of the <bitmap> element is the image data, either base64-encoded or in hexadecimal format. White space between bytes is ignored. If no filter is specified, pixels are stored row by row.

If alphaLength present, then the alpha channel follows the image data. If the data is deflated, image data and alpha channel are deflated separately. If no alphaLength is present, then the alpha component is part of each pixel before the color components.

Bitmaps use 8-bit color and alpha components. Bitmaps with color maps or with a different number of bits per component are not supported, and such support is not planned. (The Insert image function does allow you to insert arbitrary image formats, but they are stored as 8-bit per component images. Since the data is compressed, this does not seriously increase the image data size.)