MathBlockRendererRenders Markdig Markdig.Extensions.Mathematics.MathBlock nodes ($$...$$, and \[...\] on lines of its own once UseMathBracketDelimiters() is enabled) as a centred image produced by CSharpMath.SkiaSharp, once it comes near the viewport when IsLazyRenderingEnabled is set. While a document is streaming, a block that is still provisional (see IsProvisional(MarkdownObject)) is rendered as a plain code block, its source as text, until a blank line or another block follows it. With ShowCodeBlockCopyButton, the formula is written inside a markdown-math-container grid, with a copy button for its TeX source in the top right corner.
MathExtensionRegisters MathBlockRenderer and MathInlineRenderer. Markdig.Extensions.Mathematics.MathBlock extends Markdig's FencedCodeBlock, the same type MermaidBlockRenderer broadly accepts — unlike a plain Insert(0, ...) (which would make whichever extension registers *last* win), this scans for the first renderer that would accept a Markdig.Extensions.Mathematics.MathBlock and inserts just before it, so $$...$$ blocks are never swallowed by another extension regardless of the order .UseMermaid()/.UseMath() (or their IMarkViewExtension equivalents) were registered in.
MathInlineRendererRenders Markdig Markdig.Extensions.Mathematics.MathInline nodes ($...$, and \(...\) or an in-line \[...\] once UseMathBracketDelimiters() is enabled) as an inline image produced by CSharpMath.SkiaSharp, once it comes near the viewport when IsLazyRenderingEnabled is set.