跳到主要内容

custom-progressive-outline

A fully-featured progressive outline that renders headings from multiple levels with per-level styling.

Uses arrays indexed by heading level (first element = level 1, second = level 2, etc.) to apply different styling to each level. Unlike progressive-outline (a thin wrapper around Typst's built-in outline), this function renders each heading manually, giving full control over numbering, indentation, fills, and typography.

Parameters

self : none    default: none

The self context.

alpha : ratio    default: 60%

The transparency of the other headings. Default is 60%.

level : auto | int    default: auto

The outline level. When auto, all levels up to slide-level are shown. Default is auto.

numbered : array    default: (false,)

Per-level booleans indicating whether headings are numbered. Default is (false,).

filled : array    default: (false,)

Per-level booleans indicating whether to show a fill between the heading and the page number. Default is (false,).

paged : array    default: (false,)

Per-level booleans indicating whether to show the page number. Default is (false,).

numbering : array    default: ()

Per-level numbering strings or none overrides. Default is ().

text-fill : array | none    default: none

Per-level text fill colors. Default is none (inherits current text color).

text-size : array | none    default: none

Per-level text sizes. Default is none (inherits current text size).

text-weight : array | none    default: none

Per-level text weights. Default is none (inherits current text weight).

vspace : array | none    default: none

Per-level vertical space above each heading. Default is none.

title : str | none    default: none

The title of the outline section. Default is none.

indent : array    default: (0em,)

Per-level left indentation. Default is (0em,).

fill : array    default: (repeat[.],)

Per-level fill content between heading and page number. Default is (repeat[.],).

short-heading : bool    default: true

Whether to shorten headings that have labels using utils.short-heading. Default is true.

uncover-fn : function    default: body => body

A function body => body applied to currently-active (non-covered) headings. Default is the identity function.

..args : arguments

Additional arguments forwarded to the underlying progressive-outline call.

Returns: content