Project

PSWriteOffice

PowerShell document automation across Word, Excel, PowerPoint, PDF, Reader, Confluence, Visio, and open text formats.

Stars 159
Forks 14
PowerShell Gallery downloads 158,661
Release v3.0.5
Language: C# Updated: 2026-09-03

API Reference

Cmdlet

Save-OfficeLatex

Namespace PSWriteOffice
Inputs
OfficeIMO.Latex.LatexDocument
Outputs
OfficeIMO.Latex.LatexDocument

Saves an OfficeIMO LaTeX document.

Remarks

Saves an OfficeIMO LaTeX document.

Examples

Authored help example

Load and save a canonical LaTeX document.

PS>


$document = Get-OfficeLatex -Path .\Article.tex
            $document | Save-OfficeLatex -Path .\Article-normalized.tex -Mode Canonical
        

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

Save-OfficeLatex -Document <LatexDocument> [-LineEnding <LF|CRLF|CR>] [-Mode <Preserve|Canonical>] [-Options <LatexWriterOptions>] [-PassThru] -Path <String> [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Document LatexDocument requiredposition: 0pipeline: True (ByValue)
LaTeX document to save.
LineEnding OfficeLineEnding optionalposition: namedpipeline: Falsevalues: 3
Canonical line ending: LF, CRLF, or CR. Omit it to retain the source preference.
Possible values: LF, CRLF, CR
Mode LatexWriterMode optionalposition: namedpipeline: Falsevalues: 2
Writer mode. Preserve retains unchanged source; Canonical normalizes output.
Possible values: Preserve, Canonical
Options LatexWriterOptions optionalposition: namedpipeline: False
Optional writer settings.
PassThru SwitchParameter optionalposition: namedpipeline: False
Return the saved document.
Path String requiredposition: 1pipeline: False
Destination path.

Outputs

OfficeIMO.Latex.LatexDocument