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
- 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.10.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
- 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

# Td

Td wraps a table cell, just like HTML.

## Child elements

`Barcode`, `Bookmark`, `Box`, `Copy-of`, `ForAll`, `Frame`, `Groupcontents`, `Image`, `Loop`, `Overlay`, `Paragraph`, `Switch`, `Table`, `VSpace`

## Parent elements

`Case`, `ForAll`, `Loop`, `Otherwise`, `SetVariable`, `Tr`, `Until`, `While`

## Attributes

`align` (optional, CSS property: text-align)

  Horizontal alignment of the cell contents. Defaults to left.

  `left`

    The contents is left aligned (ragged right). This is the default.

  `right`

    The contents of the cell is right aligned.

  `center`

    The contents of the cell is aligned at the center, with ragged right and left margin.

  `justify`

    Justified text with straight margins.

`background-font-family` (text, optional, CSS property: background-font-family, since version 2.3.7)

  Set the font family of the background text. Defaults to the table font.

`background-size` (optional, CSS property: background-size, since version 2.3.7)

  Controls the size of the background text. Currently only 'contain' and 'auto' is allowed.

  `contain`

    Fill the height of the table cell.

  `auto`

    The background text is not scaled.

`background-text` (optional, CSS property: background-text, since version 2.3.7)

  A text that should be placed in the background of the table cell.

`background-textcolor` (optional, CSS property: background-textcolor, since version 2.3.7)

  The color of the text in the background (if any).

`background-transform` (optional, CSS property: background-transform, since version 2.3.7)

  The transformation of the background text (if any). Currently supported: `rotate(-40deg)` (and other angles in the range 0 to -90).

`backgroundcolor` (text, optional, CSS property: background-color)

  The name of the background color (if the cell should get a background).

`border-bottom` (length, optional, CSS property: border-bottom-width)

  The width (thickness) of the bottom border. The border is inside the cell.

`border-bottom-color` (text, optional, CSS property: border-bottom-color)

  The color of the bottom border.

`border-left` (length, optional, CSS property: border-left-width)

  The width (thickness) of the left border. The border is inside the cell.

`border-left-color` (text, optional, CSS property: border-left-color)

  The color of the left border.

`border-right` (length, optional, CSS property: border-right-width)

  The width (thickness) of the right border. The border is inside the cell.

`border-right-color` (text, optional, CSS property: border-right-color)

  The color of the left border.

`border-top` (length, optional, CSS property: border-top-width)

  The width (thickness) of the top border. The border is inside the cell.

`border-top-color` (text, optional, CSS property: border-top-color)

  The color of the top border.

`class` (text, optional)

  The css class to be used for formatting the table cell.

`colspan` (number, optional)

  The number of columns this cell spans. Defaults to 1.

`graphics` (text, optional, since version 4.3.12)

  Draw the predefined MetaPost graphic around the table cell (experimental).

`id` (text, optional)

  CSS id for this table cell.

`padding` (length, optional, CSS property: padding)

  Shorthand for setting padding-top and the other values with this length.

`padding-bottom` (length, optional, CSS property: padding-bottom)

  Set the inner distance (width between contents and the border) to the bottom edge.

`padding-left` (length, optional, CSS property: padding-left)

  Set the inner distance (width between contents and the border) to the left edge.

`padding-right` (length, optional, CSS property: padding-right)

  Set the inner distance (width between contents and the border) to the right edge.

`padding-top` (length, optional, CSS property: padding-top)

  Set the inner distance (width between contents and the border) to the top edge.

`rotate` (number, optional, since version 3.3.7)

  Rotate the contents of the table cell. Positive values return clockwise. This is experimental and currently only for text.

`rowspan` (number, optional)

  The number of rows for this cell. Defaults to 1.

`valign` (optional, CSS property: vertical-align)

  The vertical alignment of the cell.

  `top`

    The contents is aligned at the top edge of the cell.

  `middle`

    The contents is vertically centered.

  `bottom`

    The contents is aligned at the bottom edge of the cell.

## Remarks

The child elements of the table cells are either block objects that start a new line or inline objects that are placed horizontally next to each other (from left to right) until the width of the table cell forces a line break. Block objects are Paragraph, Table and Box, inline objects are Barcode and Image.

## Example

The following example places a background text behind the Td cell.

    <DefineFontfamily name="td-background" fontsize="12" leading="12">
      <Regular fontface="TeXGyreHeros-Bold"/>
    </DefineFontfamily>

    <Record element="data">
       <PlaceObject>
         <Table stretch="max">
           <Columns>
             <Column width="5cm"/>
           </Columns>
           <Tr>
             <Td border-top="0.25pt" border-bottom="0.25pt"
                background-text="hello!"
                background-textcolor="goldenrod"
                background-transform="rotate(-30deg)"
                background-size="contain"
                background-font-family="td-background">
               <Paragraph><Value>A wonderful serenity has taken possession of my entire soul,
                 like these sweet mornings of spring which I enjoy with my whole heart.</Value>
               </Paragraph>
             </Td>
           </Tr>
         </Table>
       </PlaceObject>
    </Record>

## See also

Command `<Table>`, chapter about tables.

- Tablerule
- Text