9.0.0.6

5.2 Part and Section Styles🔗ℹ

A style name is used for a part as follows:
  • A String: HTML: Used as a CSS class name.

  • #'index: Latex/PDF: The section rendered as an index, such as in a two-column format.

Each style property is used for a part as follows:
  • #'unnumbered: A section number is not computed or rendered for the section.

  • #'#{hidden-number}: A section number is computed for the section, but it is not rendered as part of the section name.

  • #'#{toc-hidden}: The part title is not shown in tables of contents HTML: The part title is not included in “on this page” boxes. Latex/PDF: The part title is omitted only if it is unnumbered or has a hidden number.

  • #'hidden: The part title is not shown. The #'#{toc-hidden} style property usually should be included with #'hidden for consistency. Latex/PDF: The part title is not shown only if its is empty, and in that case, it is also excluded from tables of contents.

  • #'grouper: The part is numbered with a Roman numeral, by default, and its subsections continue numbering as if they appeared in the preceeding part. In other words, the part acts like a “part” in a book where chapter numbering is continuous across parts.

  • A Style.Numberer: Determines a representation of the part’s section number as an extension of it’s parent’s number. A Style.Numberer overrides the default representation, which is a natural number or (in the case of an accompanying #'grouper property) a Roman numeral. If a #'unnumbered property is also present, a Style.Numberer property is ignored.

  • #'toc: HTML: Subparts of the part are rendered on separate pages for multi-page mode.

  • #'#{non-toc}: HTML: Initial sub-parts of the part are not rendered on separate pages for multi-page mode. This use of the style property applies only to the main part.

  • #'reveal: HTML: Shows subparts when this part is displayed in a table-of-contents panel, which normally shows only the top-level sections.

  • #'quiet: Hides entries for sub-parts of this part in a table_of_contents or local_table_of_contents listing, except when those subparts are top-level entries in the listing.

  • #'#{no-toc+aux}: HTML: As a style property for the main part of a rendered page, causes the output to not include a margin box for the main table of contents, “on this page”, or tables with the #'aux style property. The #'#{no-toc+aux} property effectively implies #'#{no-toc} and #'#{no-sidebar}, but also suppresses #'aux tables.

  • #'#{no-toc}: HTML: As a style property for the main part of a rendered page, causes the output to not include a margin box for the main table of contents. The “on this page” box that contains page-local links (and that only includes an “on this page” label for multi-page documents) takes on the location and color of the main table of contents, instead.

  • #'#{no-sidebar}: HTML: As a style property for the main part of a document, causes the output to not include an “on this page” margin box.

  • #'#{no-header-controls}: HTML: Suppresses link and link-information icons (if any) as part of a section header.

  • #'#{no-index}: Has no effect as a style property directly on a part, but as a style property for title, section, and similar, the #'#{no-index} style property causes decoding to skip the generation of an entry for the part’s title in the document index.

  • A Style.DocumentVersion: A version number for this part and its sub-parts (except as overridden). When it is not "" may be used when rendering a document; at a minimum, a non-"" version is rendered when it is attached to a part representing the whole document. The default version for a document is system.version(). In rendered form, the version is normally prefixed with the word “Version.” HTML: The prefix formatting can be controlled by overriding .version:before and/or .versionNoNav:before in CSS. Latex/PDF: The prefix formatting can be controlled by redefining the \SVersionBefore macro.

  • A Style.DocumentDate: Latex/PDF: A date for the part, normally used on a document’s main part. The default date for a document is #false, which avoids explicitly specifying a date at the Latex level, so that the current date is used as the document date. Set the date to #{""} to suppress a date in an output document.

  • A Style.DocumentSource: HTML: Provides a module path for the part’s source. Clicking on an HTML section title generated for the part or its subparts may show the module path plus a section-tag string, so that the user can create a reference to the section.

  • Style.HTML.BodyId structure: HTML: Uses the value’s string as an id attribute of the <body> tag. This style property can be set separately for parts that start different HTML pages, otherwise it is effectively inherited by subparts. The default is #{"scribble-racket-lang.org"}, but raco setup installs #{"doc-racket-lang.org"} as the id for any document that it builds.

  • An Style.HTML.Attributes: HTML: Provides additional attributes for the <html> tag when the part corresponds to its own HTML page.

  • A Style.HTML.HeadExtra: HTML: Content for the <head> tag when the part corresponds to its own HTML page.

  • A Style.HTML.HeadAddition: HTML: Like Style.HTML.HeadExtra, but also propagated to enclosing and nested HTML pages.

  • A Style.Color: HTML: Applies a color to the part title.

  • A Style.BackgroundColor: HTML: Applies a color to the background of the part title.

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

  • A Style.RenderConvertibleAs: HTML: Controls how objects that subscribe to the lib("file/convertible.rkt") protocol are rendered.

  • A Style.LinkRenderStyle: Determines the default rendering of links to sections or other destinations within the section.

  • A Style.HTML.PartTitleAndContentWrapper: HTML: Adds a tag with attributes around the part title and its content, including any content before the title from a paragraph with the #'pretitle style name. The wrapper is not used around a subpart that is rendered on a different HTML page.

  • A Style.HTML.PartLinkRedirect: HTML: Redirects hyperlinks that would otherwise go to the part so that they refer to a different URL.

  • #'#{enable-index-merge}: Latex/PDF: On an index part or one of its enclosing parts, causes index entries to be merged when they have the same content, with multiple references for the same entry combined with Smanypageref. The Smanypageref Latex macro must be redefined to accept multiple ,-separated labels and generate a suitable set of references. See also lib("scriblib/book-index.rkt").