UseMathBracketDelimiters(MarkdownPipelineBuilder) Method

Definition

Assembly MarkView.Avalonia.Math.dll

Enables LaTeX's bracket delimiters for math, which LLMs commonly emit: (...) for an inline formula and [...] for a display formula, rendered as a block when it has its lines to itself and inline otherwise. Markdig's UseMathematics() only knows \(...\)/\(...\); the two can be combined in either order, or this one used alone to keep $ a plain character. Once enabled, ( and [ no longer escape a parenthesis or bracket when they open a formula; an opening glued to a letter or digit (arr[i]) or left unclosed still does. Called by viewer.UseMath().

public static MarkdownPipelineBuilder UseMathBracketDelimiters(this MarkdownPipelineBuilder builder)

Parameters

builder
Markdig.MarkdownPipelineBuilder

Returns

Markdig.MarkdownPipelineBuilder