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
  - ClearPage
  - 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.8.0
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
  - ClearPage
  - 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

# DefineTextformat

Define text formatting instructions. A textformat is used to align and indent text and create margins and rules before and after the text.

## Child elements

(none)

## Parent elements

`Include`, `While`

## Attributes

`alignment` (optional)

  Determines the formatting of the text. It defaults to justified.

  `justified`

    Textblock has a rectangular shape.

  `leftaligned`

    The text is ragged at the right margin.

  `rightaligned`

    The text is ragged right at the left margin.

  `centered`

    The text is ragged at the left and the right margin.

  `start`

    The text is ragged at the right margin for left-to-right texts and at the left margin for right-to-left texts.

  `end`

    The text is ragged at the left margin for left-to-right texts and at the right margin for right-to-left texts.

`border-bottom` (length, optional)

  The thickness of the rule below the text.

`border-top` (length, optional)

  The thickness of the rule above the text.

`break-below` (optional)

  (Dis-)Allow break below the text. This only works if the following text is placed within the same PlaceObject or Output container.

  `yes`

    Allow a break below this text (default).

  `no`

    Prevent a page break below this text.

`column-padding-top` (optional, since version 3.2.1)

  The height of the padding that is inserted in a column (at the top) with Output/Text.

`fill-last-line` (0 up to 100, optional, since version 3.3.11)

  Ensure the length of the last line in a paragraph. Values from 0 (no change) to 100 (last line is full). Handle with care. Default is 0.

`html-vertical-spacing` (optional, since version 4.1.6)

  Set the vertical spacing for HTML contents. Defaults to “off”.

  `all`

    Allow each vertical spacing.

  `inner`

    Discard first and last vertical spacing.

  `off`

    Ignore all vertical spacing.

`hyphenate` (optional)

  Enable or disable hyphenation (default: on).

  `yes`

    Enable hyphenation (default).

  `no`

    Disable hyphenation.

`hyphenchar` (text, optional)

  The character used for hyphenation (default: -)

`indentation` (length, optional)

  The amount of indentation.

`margin-bottom` (length, optional)

  Distance between the bottom rule and the text of the next paragraph.

`margin-top` (length, optional)

  Distance between the top rule and the text of the previous paragraph.

`margin-top-box-start` (optional, since version 3.9.7)

  The top margin at the beginning of a page or column with Output. Defaults to the value of `margin-top`.

`name` (text)

  Name of the textformat that is used later in the layout.

`orphan` (yesnonumber, optional)

  If yes, allow orphans (first line of paragraph is on the previous page). If you provide a number, it is the number of lines that must be kept together. Default: no.

`padding-top` (length, optional)

  Distance between the top of the text and the top rule.

`rows` (number, optional)

  The number of rows with indentation given in the attribute `indentation`. If the number is negative, this determines the number of rows that are not indented.

`tab` (optional, since version 3.1.5)

  What to do on the tab (\& #09;) character.

  `space`

    Use tab as space

  `hspace`

    Use tab as a stretching space

`widow` (yesnonumber, optional)

  If yes, allow widows (last line of paragraph is on the next page). If you provide a number, it is the number of lines that must be kept together. Default: no.

## Remarks

The textformats `text`, `centered`, `left` and `right` are predefined. They stand for justified, centered, left aligned and right aligned text.

Indentation with negative values for rows do not work with HTML text.

## Example

    <DefineTextformat name="text with indentation" alignment="justified" indentation="1cm"/>

    <Record element="...">
      <PlaceObject>
        <Textblock textformat="text with indentation">
        <Paragraph>
          <Value>Text ...</Value>
        </Paragraph>
      </Textblock>
      </PlaceObject>
    </Record>

## See also

The section about Text formats.

- DefineMatter
- Element