API Reference
TocOptions
Options controlling TOC generation.
Inheritance
- Object
- TocOptions
Constructors
public TocOptions() #Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public Int32 MinLevel { get; set; } #Minimum heading level to include (default 1).
public Int32 MaxLevel { get; set; } #Maximum heading level to include (default 3).
public Boolean Ordered { get; set; } #When true, generates an ordered list; otherwise unordered (default).
public Boolean IncludeTitle { get; set; } #Include a title heading above the TOC (default true).
public String Title { get; set; } #Title text (default "Table of Contents").
public Int32 TitleLevel { get; set; } #Heading level for the title (default 2).
public TocScope 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 Boolean Collapsible { get; set; } #Render the TOC inside a collapsible HTML <details> element (HTML output only).
public Boolean Collapsed { get; set; } #When Collapsible is true, render the TOC collapsed by default.
public TocLayout Layout { get; set; } #Visual layout variant for HTML rendering. Default List (legacy plain list).
public Boolean ScrollSpy { get; set; } #Enable ScrollSpy behavior (highlight active heading link while scrolling). HTML output only.
public Boolean 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: "Table of Contents".
public Nullable<Int32> WidthPx { get; set; } #Optional sidebar width in pixels for SidebarLeft/SidebarRight layouts. Default 260.
public TocChrome Chrome { get; set; } #Visual chrome for the TOC container: None, Outline, Panel, or Default.
public Boolean HideOnNarrow { get; set; } #When true, hides the sidebar TOC completely on narrow screens (width up to 1000px).
public Boolean RequireTopLevel { get; set; } #When true, ensure the top-level (H1) is included even if a deeper MinLevel was specified. Helps avoid unreadable TOCs that start at H2/H3 without their parent context.
public Boolean 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 (H1 root).