Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

MarkdownTocOptions

OfficeIMO.Markdown

Namespace
OfficeIMO.Markdown
Assembly
OfficeIMO.Markdown
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Options controlling TOC generation.

Inheritance

  • object
  • MarkdownTocOptions

Usage

Explore 12 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 12

Constructors

public MarkdownTocOptions() #

Properties

public int MinLevel { get; set; } #

Minimum heading level to include (default 1).

public int MaxLevel { get; set; } #

Maximum heading level to include (default 3).

public bool Ordered { get; set; } #

When true, generates an ordered list; otherwise unordered (default).

public bool IncludeTitle { get; set; } #

Include a title heading above the TOC (default true).

public string Title { get; set; } #

Title text (default "MarkdownTable of Contents").

public int TitleLevel { get; set; } #

Heading level for the title (default 2).

public MarkdownTocScope Scope { get; set; } #

Limits TOC scope. Document = all headings; PreviousHeading = only headings under the nearest preceding heading; HeadingTitle = headings under the named heading.

public string? ScopeHeadingTitle { get; set; } #

For Scope=HeadingTitle, the heading text to scope under (case-insensitive).

public bool Collapsible { get; set; } #

Render the TOC inside a collapsible HTML <details> element (HTML output only).

public bool Collapsed { get; set; } #

When MarkdownTocOptions.Collapsible is true, render the TOC collapsed by default.

public MarkdownTocLayout Layout { get; set; } #

Visual layout variant for HTML rendering. Default MarkdownTocLayout.List (legacy plain list).

public bool ScrollSpy { get; set; } #

Enable ScrollSpy behavior (highlight active heading link while scrolling). HTML output only.

public bool Sticky { get; set; } #

When true, the TOC container becomes sticky (position: sticky) with a small top offset.

public string? AriaLabel { get; set; } #

Optional ARIA label for the navigation container. Default: "MarkdownTable of Contents".

public int? WidthPx { get; set; } #

Optional sidebar width in pixels for SidebarLeft/SidebarRight layouts. Default 260.

public MarkdownTocChrome Chrome { get; set; } #

Visual chrome for the TOC container: None, Outline, Panel, or Default.

public bool HideOnNarrow { get; set; } #

When true, hides the sidebar TOC completely on narrow screens (width up to 1000px).

public bool RequireTopLevel { get; set; } #

When true, ensure the top-level (MarkdownH1) is included even if a deeper MinLevel was specified. Helps avoid unreadable TOCs that start at MarkdownH2/MarkdownH3 without their parent context.

public bool NormalizeToMinLevel { get; set; } #

When true (default), the visual indentation of TOC items is normalized so that the minimum included heading level aligns as the root. When false, indentation reflects absolute heading levels (MarkdownH1 root).

Fields

public const int DefaultMinLevel #

Default minimum heading level.

Value: 1
public const int DefaultMaxLevel #

Default maximum heading level.

Value: 3
public const int DefaultTitleLevel #

Default title heading level.

Value: 2
public const int DefaultSidebarWidthPx #

Default sidebar width in pixels.

Value: 260