# LatexMacroDefinition

Document-local simple macro definition.

Class 

`OfficeIMO.Latex`

**Namespace**

`OfficeIMO.Latex`

**Assembly**

`OfficeIMO.Latex`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[LatexSimpleMacros.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L21)

**Modifiers**

sealed

Document-local simple macro definition.

## Inheritance

- object
- LatexMacroDefinition

## Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [LatexDocument.MacroDefinitions](/api/latex/officeimo-latex-latexdocument/#property-macrodefinitions)

### Accepted by parameters 1

- Method [LatexSimpleMacroExpander.Expand](/api/latex/officeimo-latex-latexsimplemacroexpander/#method-expand-string-collections-generic-ireadonlylist-officeimo-latex-latexmacrodefinition-int32-int32) parameter `definitions`

Filter members 

Show inherited

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public LatexCommand Command { get; }` [#](#property-command)

[LatexSimpleMacros.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L21)

Backing new/renew/provide command.

`public string Name { get; }` [#](#property-name)

[LatexSimpleMacros.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L23)

Defined control sequence without backslash.

`public int ParameterCount { get; }` [#](#property-parametercount)

[LatexSimpleMacros.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L25)

Required parameter count, including an optional first parameter when defaulted.

`public string? DefaultValue { get; }` [#](#property-defaultvalue)

[LatexSimpleMacros.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L27)

Optional first-parameter default.

`public string Body { get; }` [#](#property-body)

[LatexSimpleMacros.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L29)

Unexpanded replacement source.

`public bool IsSafe { get; }` [#](#property-issafe)

[LatexSimpleMacros.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Processing/LatexSimpleMacros.cs#L31)

True when the body passes the OfficeIMO structural safety policy.

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