Search manual:

- Main page
- Introduction
- Hello, world!
- Basics
  - How to write the layout
  - Structure of the data file and the layout rules
  - Outputting objects
  - Grid
  - Areas on the page (PositioningArea)
  - File organization
  - Hyphenation / language settings
  - Using fonts
  - Text formats
  - Text formatting
  - Colors
- Programming
- Image inclusion
- Tables
- Advanced topics
  - Bookmarks
  - Creation of XML structures
  - Print output / crop marks
  - Using CSS with the speedata Publisher
  - Groups (virtual objects)
  - Virtual pages
  - Rotation of contents
  - Sorting data
  - Wrap around images
  - Page types
  - Starting the Publisher via the Hotfolder
  - Lua-Filter / pre-processing
  - Schema validation
  - Quality assurance and PDF comparison
  - Troubleshooting / Debugging
  - Server mode (REST API)
  - Control of the layout when calling the Publisher
  - Create and use images with MetaPost
- Cookbook
  - Thumb index
  - Embed multipage PDF files
  - Layout optimization using groups
  - Imitate bulleted lists
  - Automatically generated directories
  - Create table of contents in one go
  - Page numbers: Page x of y
- Installation instructions
- File name in the Publisher
- speedata Publisher defaults
- Running the speedata publisher on the command line
- How to configure the speedata publisher
- Lenghts and units
- XPath- and Layoutfunctions
- Internal variables
- Associate XML editor with schema
  - Visual Studio Code
  - OxygenXML
  - Atom
- Changelog
- Glossary
- Compatibility with other software
- Command reference
  - A
  - Action
  - AddSearchpath
  - AtPageCreation
  - AtPageShipout
  - AttachFile
  - Attribute
  - B
  - Barcode
  - Bold
  - BoldItalic
  - Bookmark
  - Box
  - Br
  - Case
  - Circle
  - Color
  - Column
  - Columns
  - Compatibility
  - Contents
  - Copy-of
  - DefineColor
  - DefineColorprofile
  - DefineFontalias
  - DefineFontfamily
  - DefineGraphic
  - DefineMatter
  - DefineTextformat
  - Element
  - Fallback
  - Fontface
  - ForAll
  - Frame
  - Grid
  - Group
  - Groupcontents
  - HSpace
  - Hyphenation
  - I
  - Image
  - Include
  - Initial
  - InsertPages
  - Italic
  - Layout
  - Li
  - LoadDataset
  - LoadFontfile
  - Loop
  - Makeindex
  - Margin
  - Mark
  - Message
  - NewPage
  - NextFrame
  - NextRow
  - NoBreak
  - Ol
  - Options
  - Otherwise
  - Output
  - Overlay
  - Pageformat
  - Pagetype
  - Paragraph
  - PDFOptions
  - PlaceObject
  - Position
  - PositioningArea
  - PositioningFrame
  - ProcessNode
  - Record
  - Regular
  - Rule
  - SaveDataset
  - SavePages
  - SetGrid
  - SetVariable
  - SortSequence
  - Stylesheet
  - Span
  - Sub
  - Sup
  - Switch
  - Table
  - TableNewPage
  - Tablefoot
  - Tablehead
  - Tablerule
  - Td
  - Text
  - Textblock
  - Tr
  - Trace
  - Transformation
  - U
  - Ul
  - Until
  - URL
  - Value
  - VSpace
  - While

Version 4.4.1
Search manual

- Main page
- Introduction
- Hello, world!
- Basics
  - How to write the layout
  - Structure of the data file and the layout rules
  - Outputting objects
  - Grid
  - Areas on the page (PositioningArea)
  - File organization
  - Hyphenation / language settings
  - Using fonts
  - Text formats
  - Text formatting
  - Colors
- Programming
- Image inclusion
- Tables
- Advanced topics
  - Bookmarks
  - Creation of XML structures
  - Print output / crop marks
  - Using CSS with the speedata Publisher
  - Groups (virtual objects)
  - Virtual pages
  - Rotation of contents
  - Sorting data
  - Wrap around images
  - Page types
  - Starting the Publisher via the Hotfolder
  - Lua-Filter / pre-processing
  - Schema validation
  - Quality assurance and PDF comparison
  - Troubleshooting / Debugging
  - Server mode (REST API)
  - Control of the layout when calling the Publisher
  - Create and use images with MetaPost
- Cookbook
  - Thumb index
  - Embed multipage PDF files
  - Layout optimization using groups
  - Imitate bulleted lists
  - Automatically generated directories
  - Create table of contents in one go
  - Page numbers: Page x of y
- Installation instructions
- File name in the Publisher
- speedata Publisher defaults
- Running the speedata publisher on the command line
- How to configure the speedata publisher
- Lenghts and units
- XPath- and Layoutfunctions
- Internal variables
- Associate XML editor with schema
  - Visual Studio Code
  - OxygenXML
  - Atom
- Changelog
- Glossary
- Compatibility with other software
- Command reference
  - A
  - Action
  - AddSearchpath
  - AtPageCreation
  - AtPageShipout
  - AttachFile
  - Attribute
  - B
  - Barcode
  - Bold
  - BoldItalic
  - Bookmark
  - Box
  - Br
  - Case
  - Circle
  - Color
  - Column
  - Columns
  - Compatibility
  - Contents
  - Copy-of
  - DefineColor
  - DefineColorprofile
  - DefineFontalias
  - DefineFontfamily
  - DefineGraphic
  - DefineMatter
  - DefineTextformat
  - Element
  - Fallback
  - Fontface
  - ForAll
  - Frame
  - Grid
  - Group
  - Groupcontents
  - HSpace
  - Hyphenation
  - I
  - Image
  - Include
  - Initial
  - InsertPages
  - Italic
  - Layout
  - Li
  - LoadDataset
  - LoadFontfile
  - Loop
  - Makeindex
  - Margin
  - Mark
  - Message
  - NewPage
  - NextFrame
  - NextRow
  - NoBreak
  - Ol
  - Options
  - Otherwise
  - Output
  - Overlay
  - Pageformat
  - Pagetype
  - Paragraph
  - PDFOptions
  - PlaceObject
  - Position
  - PositioningArea
  - PositioningFrame
  - ProcessNode
  - Record
  - Regular
  - Rule
  - SaveDataset
  - SavePages
  - SetGrid
  - SetVariable
  - SortSequence
  - Stylesheet
  - Span
  - Sub
  - Sup
  - Switch
  - Table
  - TableNewPage
  - Tablefoot
  - Tablehead
  - Tablerule
  - Td
  - Text
  - Textblock
  - Tr
  - Trace
  - Transformation
  - U
  - Ul
  - Until
  - URL
  - Value
  - VSpace
  - While

- Dieses Handbuch auf Deutsch

# Areas on the page (PositioningArea)

The pages can be divided into virtual areas. To do this, you specify frames in the page type:

    <Pagetype name="page" test="true()">
      <Margin left="1cm" right="1cm" top="1cm" bottom="1cm"/>
      <PositioningArea name="pagehead">
        <PositioningFrame width="19" height="2" row="1" column="1"/>
      </PositioningArea>
      <PositioningArea name="left">
        <PositioningFrame
            width="4"
            height="{sd:number-of-rows() - 3}"
            row="4"
            column="2"/>
      </PositioningArea>
      <PositioningArea name="text">
        <PositioningFrame
            width="10"
            height="{sd:number-of-rows() - 3}"
            row="4"
            column="8"/>
      </PositioningArea>
    </Pagetype>

Three areas are defined here, which can be addressed with the attribute area="…​" when it comes to the output of objects or the movement of the cursor:

    <Record element="data">
      <PlaceObject area="pagehead">
        <Textblock>
          <Paragraph>
            <Value>pagehead, height of the area: </Value>
            <Value select="sd:number-of-rows('pagehead')" />
          </Paragraph>
        </Textblock>
      </PlaceObject>
      <PlaceObject area="left">
        <Textblock>
          <Paragraph>
            <Value>left, height: </Value>
            <Value select="sd:number-of-rows('left')" />
          </Paragraph>
        </Textblock>
      </PlaceObject>
      <PlaceObject area="text">
        <Textblock>
          <Paragraph>
            <Value>text, width: </Value>
            <Value select="sd:number-of-columns('text')" />
          </Paragraph>
        </Textblock>
      </PlaceObject>
    </Record>

The areas of the page are addressed with area="…​". Some layout functions allow you to specify an area.

## Cursor

The cursor is a virtual marker that is moved in the grid after each output, unless it is explicitly prohibited (`keepposition="yes"` at `<PlaceObject>`). The selection is controlled separately for each area. I.e. an output in one area does not result in a change of the cursor in another area. If an object is output that extends to the right margin, the cursor automatically jumps to the next free line. The cursor can be moved line by line with `<NextRow>`. If you specify `rows="n"`, the cursor is placed n rows lower. If you specify `row="n"`, the cursor is placed in row `n`.

The following example illustrates the behavior of the cursor.

    <Layout
      xmlns="urn:speedata.de:2009/publisher/en"
      xmlns:sd="urn:speedata:2009/publisher/functions/en">

      <Trace grid="yes"/>

      <Record element="data">
        ①
        <PlaceObject>
          <Box width="{sd:number-of-columns()}" height="1"/>
        </PlaceObject>
        <NextRow rows="1" />
        <PlaceObject>
          <Box width="{sd:number-of-columns()}" height="1"/>
        </PlaceObject>

        <NextRow rows="2" />

        <PlaceObject>
          <Box width="4" height="1"/>
        </PlaceObject>
        ②
        <NextRow rows="1" />
        <PlaceObject>
          <Box width="4" height="1"/>
        </PlaceObject>

      </Record>
    </Layout>

① The two objects cover the entire width. The cursor automatically jumps to the next line as soon as it is behind the right edge. The `<NextRow>` creates the free row.

② The cursor is now in row 6 and column 5. The following row feed sets the cursor in row 7 and column 1.

The behavior of NextRow

## Overflow of texts into the next frame

When outputting texts using the commands `<Output>`/`<Text>`, page breaks can occur in texts, as described in the section Texts with page break. This works not only for page boundaries, but also for areas on the pages, provided that they have the same name.

This page definition serves as an example:

    <Pagetype name="page" test="true()">
      <Margin left="1cm" right="1cm" top="1cm" bottom="1cm"/>
      <PositioningArea name="text">
        <PositioningFrame width="4" height="17" row="2" column="1"/>
        <PositioningFrame width="4" height="10" row="3" column="6"/>
        <PositioningFrame width="4" height="24" row="1" column="11"/>
      </PositioningArea>
    </Pagetype>

The output is generated via `<Output>`:

    <Output area="text">
      <Text>
        <Paragraph>
          <Value select="sd:dummytext(3)"/>
        </Paragraph>
      </Text>
    </Output>

The text automatically flows into the next free area. If necessary, a page break is inserted.

## Force a frame switch

You can also force a frame to change. With `<NextFrame>` and the specification of an area (`area="…​"`) the cursor is placed in the top left corner of the next frame, if necessary a page break is inserted.

- Grid
- File organization