|  |  | 9.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.

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.

The `<preamble>` element has an optional attribute `encoding`. If this is set, the LaTeX file created for the conversion of text objects is converted to this encoding.

### 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
  (required) possible values are "DeviceGray", "DeviceRGB", and "DeviceCMYK",
BitsPerComponent
  (required) value must be 8,
ColorKey
  (optional) an RGB color in hexadecimal, indicating the transparent color (only suppored for "DeviceRGB" color space),
length
  (required unless there is no filter) 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).

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, with rows padded to a full byte boundary.

Note that images with color maps are not supported, and such support is not planned. (The Insert image ipelet does allow you to insert images with color maps, but they are stored as 24-bit images. Since the data is compressed, this does not seriously increase the image data size.)

|  |  | 9.1 The `<ipe>` element