# Elementname: `DefineTextformat`

## Description

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

Allowed attributes: alignment, border-bottom, border-top, break-below, hyphenate, hyphenchar, indentation, margin-bottom, margin-top, name, orphan, padding-top, rows, widow

Child elements: (none)

Parent elements: Include, Layout

### Attributes

alignment (optional)

  Determines the formatting of the text.

  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.

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.

  yes: | Allow a break below this text (default).
  no: | Prevent a page break below this text.

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.

name (text)

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

orphan (optional)

  If no, prohibit orphans (first line of paragraph is on the previous page). Default: no.

  yes: | Allow orphans.
  no: | Prevent orphans (default).

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 determiens the number of rows that are not indented.

widow (optional)

  If no, prohibit widows (last line of paragraph is on the next page). Default: no.

  yes: | Allow widows.
  no: | Prevent widows (default).

### Remarks

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

## Example

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

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

## See also

Textblock, Paragraph

# Commands

- A
- Action
- AddToList
- AtPageCreation
- AtPageShipout
- Attribute
- B
- Barcode
- Bold
- BoldItalic
- Bookmark
- Box
- Br
- Case
- Color
- Column
- Columns
- Contents
- Copy-of
- DefineColor
- DefineFontfamily
- DefineTextformat
- Element
- EmptyLine
- Fontface
- ForAll
- Frame
- Grid
- Group
- HSpace
- Hyphenation
- I
- Image
- Include
- InsertPages
- Italic
- Layout
- Li
- LoadDataset
- LoadFontfile
- Loop
- Makeindex
- Margin
- Mark
- Message
- NewPage
- NextFrame
- NextRow
- Ol
- Options
- Otherwise
- Output
- Pageformat
- Pagetype
- Paragraph
- PlaceObject
- PositioningArea
- PositioningFrame
- ProcessNode
- Record
- Regular
- Rule
- SaveDataset
- SavePages
- Sequence
- SetGrid
- SetVariable
- SortSequence
- Stylesheet
- Sub
- Sup
- Switch
- Table
- Tablefoot
- Tablehead
- Tablerule
- Td
- Text
- Textblock
- Tr
- Transformation
- U
- URL
- Ul
- Until
- VSpace
- Value
- While

Version: 2.2.0 | Start page | Command reference | Other language: German