# Save-OfficeLatex

Saves an OfficeIMO LaTeX document. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`OfficeIMO.Latex.LatexDocument`

**Outputs**

`OfficeIMO.Latex.LatexDocument`

**Source**

[SaveOfficeLatexCommand.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Latex/SaveOfficeLatexCommand.cs#L15) 

Saves an OfficeIMO LaTeX document.

## Syntax

```
Save-OfficeLatex
-Document <LatexDocument>
[-LineEnding <LF|CRLF|CR>]
[-Mode <Preserve|Canonical>]
[-PassThru]
[-Path] <String>
[-WhatIf]
[-Confirm]
[<CommonParameters>]
```

[#](#method-save-officelatex-latexdocument-officelineending-latexwritermode-switchparameter-string-switchparameter-switchparameter)

Parameter set: `Document`

## Examples

### Load and save a canonical LaTeX document.

```powershell
$document = Open-OfficeLatex -Path .\Article.tex
$document | Save-OfficeLatex -Path .\Article-normalized.tex -Mode Canonical
```

## Parameters

**-Document LatexDocument requiredpipeline: True (ByValue)**

LaTeX document to save.

**-LineEnding OfficeLineEnding optional**

Canonical line ending: LF, CRLF, or CR. Omit it to retain the source preference.

Possible values: `LF`, `CRLF`, `CR`

**-Mode LatexWriterMode optional**

Writer mode. Preserve retains unchanged source; Canonical normalizes output.

Possible values: `Preserve`, `Canonical`

**-PassThru SwitchParameter optional**

Return the saved document.

**-Path String requiredposition: 0**

Destination path.

**-WhatIf SwitchParameter optional**

Shows what would happen if the command runs.

**-Confirm SwitchParameter optional**

Prompts for confirmation before running the command.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

<!-- PowerForge markdown artifact sha256:ED58248753182DEE5B45A8FEAAD5C5E3215302DE91022AFB57C023D9217A6A51 -->
