Version 5.7.12

# Command reference

All commands of the layout file, arranged by topic. The sidebar lists the commands alphabetically; see the attribute index for an overview of all attributes.

## Structure and settings

`Layout`
  This command is the root element in the Layout instructions.
`Include` (deprecated)
  Toplevel element for included layout files.
`Section`
  Groups layout instructions.
`Compatibility`
  Set compatibility for older layouts
`Options`
  Set publisher specific options.
`AddSearchpath`
  Add a directory on the hard-drive to be added to the publisher’s search path.
`Message`
  Writes a message onto the console and to the protocol file.
`Trace`
  Set debugging switches

## Data processing

`Record`
  Contains the instructions when the publisher processes the element in the data file with the given name.
`ProcessNode`
  Executes all given nodes.
`ForAll`
  Executes the given commands for all elements in the data XML file that match the contents of the attribute select.
`Copy-of`
  Replace this element by the copy of the selection as an element structure.
`Value`
  Contains a text value that is passed to the surrounding element.
`SortSequence`
  Sort a list.
`LoadDataset`
  Load an XML file previously written by SaveDataset (attribute name) or a well formed XML file (attribute filename).
`SaveDataset`
  Saves an element/attribute structure to be used in the next publisher run.
`Element`
  Create a data structure that can be used to save on the hard-drive between consecutive runs (with SaveDataset).
`Attribute`
  Create an attribute for the Element data structure that can be saved to the hard drive with SaveDataset.

## Programming

`SetVariable`
  Associates a value with a variable name.
`Function`
  Define a function
`Param`
  Specify a parameter for a function definition.
`Switch`
  Create an if-then-else construct.
`Case`
  Part of a Switch construct.
`Otherwise`
  Default branch of a Switch command.
`Loop`
  Repeat the contents of this element several times.
`While`
  Create a loop.
`Until`
  Create a loop.

## Pages and grid

`Pageformat`
  The size of the PDF pages.
`Pagetype`
  Define a master page.
`Margin`
  Set the margin of the document or master page.
`AtPageCreation`
  The contents of the element AtPageCreation is executed the first time the page is accessed.
`AtPageShipout`
  The enclosed instructions will be executed when the page is placed into the PDF file.
`ClearPage`
  Finishes the current page.
`DefineMatter`
  Define a new section of the document.
`InsertPages`
  Insert previously saved pages or reserve space for pages to be generted in the future.
`SavePages`
  This command is used for two different but similar purposes.
`PositioningArea`
  Describes an area which contains one or more frames.
`PositioningFrame`
  Defines a rectangular area for objects.
`SetGrid`
  Set size of the grid cells.
`Grid`
  Override the grid settings from SetGrid.
`NextRow`
  The virtual cursor is set on the next free row.
`NextFrame`
  Switch to the next free frame of a positioning area.

## Output of objects

`PlaceObject`
  Outputs a rectangular object (image, table, box, barcode or textblock).
`Textblock`
  Create a rectangular piece of text.
`Text`
  Create a text that can be broken across text containers or pages.
`Output`
  This command is similar to PlaceObject and is currently limited to output text which can be broken across positioning frames and which can wrap around objects.
`Image`
  Includes an external Graphic.
`Box`
  Create a rectangular colored area.
`Circle`
  Create a circle or ellipse.
`Rule`
  Draw a horizontal or vertical rule in the grid.
`Barcode`
  Print a 1d or 2d barcode.
`Frame`
  Manipulate an object’s appearance by drawing a frame.
`Clip`
  Clip an image or other output
`Transformation`
  Manipulate an object’s appearance by applying a matrix.
`Overlay`
  Overlays the first element with the following “positions”.
`Position`
  Add an element to the current Overlay.
`Group`
  Create a virtual page that behaves like a real page but is not placed into the PDF.
`Groupcontents`
  Insert the contents of a group (a virtual area)
`Contents`
  Marks the contents of a Group, a virtual area.
`DefineGraphic`
  Define a metapost graphic to be used in Box.

## Text and paragraphs

`Paragraph`
  Insert a paragraph of text.
`B`
  Switch to font weight “bold”
`I`
  Switch to italic text.
`U`
  Underline text.
`Sub`
  Subscript text.
`Sup`
  Superscript text.
`Span`
  Surround text by styling options.
`Br`
  Insert a newline
`NoBreak`
  Don’t allow a line break within this element
`Initial`
  Make some letters appear in a larger font at the beginning of the paragraph.
`HSpace`
  Two modes: with a given width, the space takes up the given amount.
`VSpace`
  Create a vertically stretching space.
`URL`
  enables a better breaking of URLs.
`Hyphenation`
  Suggest a hyphenation.
`DefineTextformat`
  Define text formatting instructions.

## Fonts

`DefineFontfamily`
  Defines a font family consisting of the shapes “regular”, “bold”, “bold italic” and “italic”.
`Regular`
  The (symbolic) name of the fontface for regular text, i.e. without bold or italic.
`Bold`
  Name of the font face that should be used when switching to “bold”.
`Italic`
  The font face to be used when the user switches to italic.
`BoldItalic`
  Name of the font face that should be used when switching to “bold italic”.
`DefineFontalias`
  Defines a font alias.
`Fallback`
  Define a fallback for LoadFontfile
`LoadFontfile`
  Load a font file (.otf, .ttf, .pfb) and associate it with an internal name.
`Fontface`
  Switch to another font family.
`Axis`
  Set a design axis of a variable font to a specific value.

## Colors

`DefineColor`
  Colors defined with DefineColors can be referenced later by their name.
`Color`
  Switch to another text color

## Tables

`Table`
  Create a table that is similar to the HTML table model.
`Columns`
  Set the widths and other properties of the columns in a table.
`Column`
  Set the properties of a column in the table.
`Tablehead`
  Create a repeating table head.
`Tablefoot`
  Create a repeating table footer.
`Tr`
  Tablerow
`Td`
  Td wraps a table cell, just like HTML.
`Tablerule`
  Insert a horizontal rule in a table
`TableNewPage`
  Switches to a new page within the table.

## Lists

`Ol`
  Create an ordered list, just like in HTML
`Ul`
  Create an unordered list, just like in HTML
`Li`
  List item in an ordered or unordered list.

## Directories and references

`Mark`
  Sets an invisible mark into the output.
`Makeindex`
  Sort and split a list of elements to make an index.
`Bookmark`
  Create a bookmark for the PDF viewer (e.g. Adobe Reader).
`A`
  Insert hyperlink to a URL.

## HTML and CSS

`HTML`
  Create HTML output
`Stylesheet`
  Load a CSS file or define CSS rules

## PDF output

`PDFOptions`
  Set PDF options like number of copies and such
`DefineColorprofile`
  Associate an external color profile with a name.
`AttachFile`
  Attach a file to the PDF.
`StructureElement`
  Create a structure hierarchy for tagged PDF.

#### On this page