# LatexSourceText

Complete decoded LaTeX source with offset mapping.

Class 

`OfficeIMO.Latex`

**Namespace**

`OfficeIMO.Latex`

**Assembly**

`OfficeIMO.Latex`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[LatexSource.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Source/LatexSource.cs#L84)

**Modifiers**

sealed

Complete decoded LaTeX source with offset mapping.

## Inheritance

- object
- LatexSourceText

## 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 2

- Property [LatexDocument.Source](/api/latex/officeimo-latex-latexdocument/#property-source)
- Property [LatexSyntaxTree.Source](/api/latex/officeimo-latex-latexsyntaxtree/#property-source)

Filter members 

Show inherited

## Methods

`public LatexSourceSpan CreateSpan(int start, int end)` [#](#method-createspan-int32-int32)

[LatexSource.cs:93](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Source/LatexSource.cs#L93)

Creates a checked half-open span.

Parameters

**start int required**

**end int required**

Returns

`LatexSourceSpan`

`public LatexSourcePosition GetPosition(int offset)` [#](#method-getposition-int32)

[LatexSource.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Source/LatexSource.cs#L84)

Maps an offset to line and column.

Parameters

**offset int required**

Returns

`LatexSourcePosition`

## 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 string Text { get; }` [#](#property-text)

[LatexSource.cs:76](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Source/LatexSource.cs#L76)

Complete source characters.

`public int LineCount { get; }` [#](#property-linecount)

[LatexSource.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Source/LatexSource.cs#L78)

Number of logical lines.

`public string PreferredLineEnding { get; }` [#](#property-preferredlineending)

[LatexSource.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Latex/Source/LatexSource.cs#L80)

First source line ending, or environment newline when absent.

<!-- PowerForge markdown artifact sha256:475D29BD31278975461D7C5A3ADD13E83CDEA6D70EF817F1BEE17B004D98B523 -->
