9.0.0.6

5.1 Element Styles🔗ℹ

A style name is used for an Element as follows:
  • A String: HTML: Used as a CSS class name. Latex/PDF: Used as the name of a command called with the element content as a single argument.

  • #'tt, #'italic, #'bold, #'roman, #'sf, #'url, #'subscript, #'superscript, #'smaller, #'larger: Basic styles recognized by all renderers.

  • #'hspace: Renders the element’s content as monospace blanks.

  • #'newline: Renders a line break, independent of the element’s content.

  • #'#{no-break}: Prevents line breaks when rendering the elements content.

Each style property is used for an Element as follows:
  • A Style.TargetURL: Generates a hyperlink.

  • A Style.HTML.URLAnchor: HTML: Inserts a hyperlink target at the start of the element’s content.

  • A Style.Color): Applies a color to the content text.

  • A Style.BackgroundColor: Applies a color to the background of the content.

  • A Style.HTML.AltTag: HTML: Generates the given HTML tag instead of the default one (<span>, <b>, etc.

  • A Style.HTML.Attributes: HTML: Provides additional HTML attributes for a tag.

  • A Style.HTML.Hover): HTML: Adds a text label to the content to be shown when the mouse hovers over it.

  • A Style.HTML.Script: HTML: Supplies a script alternative to the element’s content.

  • A Style.HTML.Xexpr: HTML: Supplies literal HTML to render before and after the element’s content.

  • #'aux: Intended for use in titles, where the auxiliary part of the title can be omitted in hyperlinks. See, for example, secref.

  • #'#{tt-chars}: Latex/PDF: When the style name is a string, render the element’s content with escapes suitable for Latex tt mode.

  • #'#{exact-chars}: Latex/PDF: When the style name is a string or #false, render the elements content exactly (without escapes).

  • A Style.Latex.CommandExtras: Latex/PDF: Adds strings as arguments to the Latex command.