# LatexSourceSpan

Half-open span in decoded LaTeX source.

Struct 

`OfficeIMO.Latex`

**Namespace**

`OfficeIMO.Latex`

**Assembly**

`OfficeIMO.Latex`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

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

**Base**

`ValueType`

**Implements**

`IEquatable<LatexSourceSpan>`

**Modifiers**

sealed

Half-open span in decoded LaTeX source.

## Inheritance

- ValueType
- LatexSourceSpan

## Usage

Explore 11 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 10

- Property [LatexArgument.ContentSpan](/api/latex/officeimo-latex-latexargument/#property-contentspan)
- Property [LatexDiagnostic.Span](/api/latex/officeimo-latex-latexdiagnostic/#property-span)
- Property [LatexEnvironment.ContentSpan](/api/latex/officeimo-latex-latexenvironment/#property-contentspan)
- Property [LatexListItem.ContentSpan](/api/latex/officeimo-latex-latexlistitem/#property-contentspan)
- Property [LatexMath.ContentSpan](/api/latex/officeimo-latex-latexmath/#property-contentspan)
- Property [LatexParagraph.Span](/api/latex/officeimo-latex-latexparagraph/#property-span)
- Method [LatexSourceText.CreateSpan](/api/latex/officeimo-latex-latexsourcetext/#method-createspan-int32-int32)
- Property [LatexSyntaxNode.Span](/api/latex/officeimo-latex-latexsyntaxnode/#property-span)
- Property [LatexTableCell.Span](/api/latex/officeimo-latex-latextablecell/#property-span)
- Property [LatexToken.Span](/api/latex/officeimo-latex-latextoken/#property-span)

### Accepted by parameters 1

- Method [LatexSourceSpan.Equals](/api/latex/officeimo-latex-latexsourcespan/#method-equals-officeimo-latex-latexsourcespan) parameter `other`

Filter members 

Show inherited

## Methods

`public bool ContainsOffset(int offset)` [#](#method-containsoffset-int32)

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

Tests whether an offset is inside the span.

Parameters

**offset int required**

Returns

`bool`

Equals 2 overloads

`public bool Equals(LatexSourceSpan other)` [#](#method-equals-officeimo-latex-latexsourcespan)

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

Indicates whether the current object is equal to another object of the same type.

Parameters

**other OfficeIMO.Latex.LatexSourceSpan required**

An object to compare with this object.

Returns

`bool` true if the current object is equal to the other parameter; otherwise, false.

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

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

Indicates whether this instance and a specified object are equal.

Parameters

**obj object? required**

The object to compare with the current instance.

Returns

`bool` true if obj and this instance are the same type and represent the same value; otherwise, false.

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

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

Returns the hash code for this instance.

Returns

`int` A 32-bit signed integer that is the hash code for this instance.

`public string Slice(string source)` [#](#method-slice-string)

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

Returns the represented source slice.

Parameters

**source string required**

Returns

`string`

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

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

Returns the fully qualified type name of this instance.

Returns

`string` The fully qualified type name.

## Inherited Methods

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

Inherited from object

Returns

`Type`

## Properties

`public LatexSourcePosition Start { get; }` [#](#property-start)

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

Start position.

`public LatexSourcePosition End { get; }` [#](#property-end)

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

Exclusive end position.

`public int Length { get; }` [#](#property-length)

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

Character length.

<!-- PowerForge markdown artifact sha256:49EAB78674B4E8C294F230AF4C3EBE65AB3C375EDCC69C58DD4E6F4C4D2AEEA1 -->
