API Reference
Command
Add-OfficeMarkdownTableOfContents
Adds a Markdown table of contents placeholder.
Remarks
Adds a Markdown table of contents placeholder.
Examples
Add a TOC at the top of the document.
PS>MarkdownTableOfContents -Title 'Contents' -MinLevel 2 -MaxLevel 3 -PlaceAtTop
Inserts a generated table of contents for headings in the document.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Add-OfficeMarkdownTableOfContents [-ForPreviousHeading] [-ForSection <String>] [-MaxLevel <Int32>] [-MinLevel <Int32>] [-Ordered] [-PassThru] [-PlaceAtTop] [-Title <String>] [-TitleLevel <Int32>] [<CommonParameters>]#Parameter set:
ContextParameters
- ForPreviousHeading SwitchParameter
- Scope the TOC to the previous heading.
- ForSection String
- Scope the TOC to the named section heading.
- MaxLevel Int32
- Maximum heading depth included in the table of contents.
- MinLevel Int32
- Minimum heading depth included in the table of contents.
- Ordered SwitchParameter
- Generate an ordered table of contents list.
- PassThru SwitchParameter
- Emit the updated Markdown document.
- PlaceAtTop SwitchParameter
- Insert the TOC at the start of the document.
- Title String
- Heading text displayed above the generated table of contents.
- TitleLevel Int32
- Heading level used for the TOC title.
Outputs
OfficeIMO.Markdown.MarkdownDoc
Add-OfficeMarkdownTableOfContents -Document <MarkdownDoc> [-ForPreviousHeading] [-ForSection <String>] [-MaxLevel <Int32>] [-MinLevel <Int32>] [-Ordered] [-PassThru] [-PlaceAtTop] [-Title <String>] [-TitleLevel <Int32>] [<CommonParameters>]#Parameter set:
DocumentParameters
- Document MarkdownDoc
- Markdown document to update outside the DSL context.
- ForPreviousHeading SwitchParameter
- Scope the TOC to the previous heading.
- ForSection String
- Scope the TOC to the named section heading.
- MaxLevel Int32
- Maximum heading depth included in the table of contents.
- MinLevel Int32
- Minimum heading depth included in the table of contents.
- Ordered SwitchParameter
- Generate an ordered table of contents list.
- PassThru SwitchParameter
- Emit the updated Markdown document.
- PlaceAtTop SwitchParameter
- Insert the TOC at the start of the document.
- Title String
- Heading text displayed above the generated table of contents.
- TitleLevel Int32
- Heading level used for the TOC title.
Outputs
OfficeIMO.Markdown.MarkdownDoc