MarkView.Avalonia.Math 12.4.0

dotnet add package MarkView.Avalonia.Math --version 12.4.0
                    
NuGet\Install-Package MarkView.Avalonia.Math -Version 12.4.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MarkView.Avalonia.Math" Version="12.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarkView.Avalonia.Math" Version="12.4.0" />
                    
Directory.Packages.props
<PackageReference Include="MarkView.Avalonia.Math" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MarkView.Avalonia.Math --version 12.4.0
                    
#r "nuget: MarkView.Avalonia.Math, 12.4.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MarkView.Avalonia.Math@12.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MarkView.Avalonia.Math&version=12.4.0
                    
Install as a Cake Addin
#tool nuget:?package=MarkView.Avalonia.Math&version=12.4.0
                    
Install as a Cake Tool

MarkView.Avalonia.Math

NuGet Version NuGet Downloads Avalonia CI License

LaTeX math for MarkView.Avalonia, typeset with CSharpMath in .NET: no browser, WebView or JavaScript. Math is opt-in, since $ is common in ordinary prose.

Installation

dotnet add package MarkView.Avalonia.Math

Usage

viewer.UseMath();                              // $…$, $$…$$, \(…\) and \[…\]
viewer.UseMath(bracketDelimiters: false);      // dollars only

UseMath() also sets the viewer's pipeline, so that the delimiters are parsed. To enable math on every viewer of the application, add the extension and the pipeline at startup:

MarkdownViewerDefaults.Extensions.AddMath();
MarkdownViewerDefaults.Pipeline = new MarkdownPipelineBuilder()
    .UseGitHubExtensions()
    .UseMathematics()
    .UseMathBracketDelimiters()
    .Build();
Einstein's famous equation is $E = mc^2$.

$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$

Formulas follow the theme between light and dark, display formulas get a copy button for their TeX source, and invalid LaTeX shows an error instead of throwing.

Documentation

  • Math: delimiters, the bracket rules, copy, streaming and errors.

The documentation site covers the whole library, and the demo shows every feature in the browser.

License

MIT © Nicolas Musset

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.4.0 39 10/21/2026
12.3.0 93 10/8/2026
12.2.1 156 8/23/2026
12.2.0 129 8/22/2026