iainbrighton / PScribo

PowerShell documentation framework
MIT License
231 stars 35 forks source link

Add -Tabs support to Section keyword #73

Closed iainbrighton closed 6 years ago

iainbrighton commented 6 years ago

In some scenarios, indenting section headers may be desirable, e.g.

Import-Module -Name PScribo -Force

Document IndentedSections {
    TOC
    Section 'Section 1' -Style Heading1 {
        Section 'Indented Heading shown in TOC' -Style Heading2 {

            ## Paragrpah indented to match section heading indentation
            Paragraph -Tabs 1 'Indented paragraph'

            ## Table indented to match section heading indentation
            Get-Process |
                Select -First 1 -Property Id, Handles, CPU, SI, Name |
                    Table -List -Tabs 1
        }

    }
} | Export-Document -Format Word -Path $env:TEMP -PassThru | Invoke-Item

Should render output like so: image