Cmdlet
Add-OfficeMarkdownTableOfContents
Adds a Markdown table of contents placeholder.
Syntax
Add-OfficeMarkdownTableOfContents
[-ForPreviousHeading]
[-ForSection <String>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-Ordered]
[-PassThru]
[-PlaceAtTop]
[-Title <String>]
[-TitleLevel <Int32>]
[<CommonParameters>]#Parameter set:
ContextAdd-OfficeMarkdownTableOfContents
-Document <MarkdownDoc>
[-ForPreviousHeading]
[-ForSection <String>]
[-MaxLevel <Int32>]
[-MinLevel <Int32>]
[-Ordered]
[-PassThru]
[-PlaceAtTop]
[-Title <String>]
[-TitleLevel <Int32>]
[<CommonParameters>]#Parameter set:
DocumentExamples
Add a TOC at the top of a generated report.
New-OfficeMarkdown -Path .\Report.md {
Add-OfficeMarkdownHeading -Level 1 -Text 'Release Report'
Add-OfficeMarkdownHeading -Level 2 -Text 'Summary'
Add-OfficeMarkdownParagraph -Text 'Current state and risks.'
Add-OfficeMarkdownHeading -Level 2 -Text 'Appendix'
Add-OfficeMarkdownParagraph -Text 'Supporting evidence.'
Add-OfficeMarkdownTableOfContents -Title 'Contents' -MinLevel 2 -MaxLevel 3 -PlaceAtTop
}Inserts a generated table of contents for headings in the document.
Parameters
- -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.
- -Document MarkdownDoc
- Markdown document to update outside the DSL context.
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.