On this page:
Style.Table  Cells
Style.Table  Cells
Style.Table  Columns
Style.Table  Columns
Style.HTML.Column  Attributes
Style.HTML.Column  Attributes
9.0.0.6

5.4 Table, Column, and Cell Styles🔗ℹ

A style name is used for a table as follows:
  • A String: HTML: Used as a CSS class name. Latex/PDF: Used as the name of an environment used around the table content.

  • #'boxed: Renders as a definition. This style name is not intended for use on a table that is nested within another #'boxed table; nested uses may look right for some renderers but not others.

  • #'centered: HTML: Centers the table horizontally with respect to its enclosing flow.

  • #'block: Latex/PDF: Prevents pages breaks between the table’s rows.

Each style property is used for a table as follows:

Latex/PDF: A paragraph as a cell value is not automatically line-wrapped, unless a vertical alignment is specified for the cell through a Style.TableCells or Style.TableColumns style property. To get a line-wrapped paragraph, use a compound paragraph or use an element with a string style and define a corresponding Latex macro in terms of \parbox. For Latex output of blocks in the flow that are nested flows, itemizations, compound paragraphs, or DelayedBlock, the block is wrapped with minipage using \linewidth divided by the column count as the width.

A Style.TableCells object is intended for use as a style property in a table’s style to provide styles to individual cells.

A style name is used for a table cell as follows:
  • A String: HTML: Used as a CSS class name for a <td> tag. Latex/PDF: Used as the name of a command to wrap the cell content.

Each style property is used for a table cell as follows:
  • #'left: Left-align the cell content.

  • #'right: Right-align the cell content top baselines.

  • #'center: Center the cell content horizontally.

  • #'top: Top-align the cell content.

  • #'baseline: Align the cell content top baselines.

  • #'bottom: bottom-align the cell content.

  • #'vcenter: Center the cell content vertically.

  • #'border: Draw a line around all sides of the cell. Borders along a shared edge of adjacent cells are collapsed into a single line.

  • #'#{left-border}, #'#{right-border}, #'#{top-border}, or #'#{bottom-border}: Draw a line along the corresponding side of the cell (with the same border collapsing as for #'border.

  • A Style.Color: HTML: Applies a color to the cell content.

  • A Style.BackgroundColor: HTML: Applies a color to the cell background.

  • A Style.HTML.Attributes: HTML: Provides additional attributes for the cell’s <td> tag.

The Style.TableCells veneer recognizes the same values as the Racket Scribble library’s table-cells?.

Like Style.TableCells, but but with support for a Style.HTML.ColumnAttributes property in each style, and the styles list is otherwise duplicated for each row in the table. The non-Style.HTML.ColumnAttributes parts of a Style.TableColumns are used only when a Style.TableCells property is not present along with the Style.TableColumns property in a table.

HTML: For each column that has a Style.HTML.ColumnAttributes property in the corresponding element of styles, the attributes are put into an HTML <col> tag within the table.

The Style.TableColumns veneer recognizes the same values as the Racket Scribble library’s table-columns?.

Like Style.HTML.Attributes, but specifically for columns in a table. A Style.HTML.ColumnAttributes object is normally useful as a style property within a style within Style.TableColumns.

The Style.HTML.ColumnAttributes veneer recognizes the same values as the Racket Scribble library’s column-attributes?.