When designing a document in RML, the main concept to grasp is the difference between the static elements on the page, and 'flowables'.

The component parts that make up a document, ie. text, pictures, or primitives (like lines, rectangles and circles) can be either static or flowable, depending on whereabouts in the RML document they are described.

A static element is fixed into position on a page. You specify the x and y coordinates and the element appears at that position.

With flowables, however, you specify the position of a 'frame', which can be thought of as a box which contains flowable elements. The elements then flow into the frame until that frame is full. Then they start filling up the next frame. So the frames are static elements, but what the frames contain is 'flowable'.

The other main element of a document is the styling: the fonts, line weights and colours, etc..

These three elements are defined in the three main sections of a basic RML document like this:

<template> this section contains the STATIC elements of the document, and the layout of the frames on each page. </template> <stylesheet> this section contains the STYLE information for formatting text and tables. </stylesheet> <story> this section contains the FLOWABLE elements of the document. This is usually where most of the text goes. This content will flow into the frames specified in the <template> section. </story>

As an example of the above concepts, imagine the front page of a newspaper. In terms of RML, the masthead (eg. "The Times") would be a static, fixed element - it's always the same text in the same place. There might be a solid line under the top banner, along with the price and the date, all of which would be fixed position elements. Most of the centre of the page would then be divided into frames containing text in various styles: headlines, subsection headings, and plain text. The text of these stories would 'fill up' each of these frames from top to bottom, in a series of paragraphs. Finally there might be an advert in a fixed position at the bottom of the page.

So, the <template> section would contain details about the masthead and the position of the frames, the <stylesheet> section would define the fonts used for headlines and body text, and the actual text of the news would be in the <story> section. The news would flow from top to bottom, left to right, into each frame on the page.

This is a simplified version of the truth, and there are exceptions to all this, but that comes later...

1. Colours can be specified in three ways in RML: as html-style 'named' colours (eg. "red"); as rgb values (eg. "#004A8D") or as CMYK (eg. "#ff99001f")

2. X & Y co-ordinates generally refer to the bottom left corner of an element.

3. Measurements default to points, but can be millimetres(mm), centimetres(cm), or inches(in). They can be mixed and matched as you like eg(x="5" y="10mm" height="2cm" width="1in").