Aspose.TeX 26.2.0

Prefix Reserved
dotnet add package Aspose.TeX --version 26.2.0
                    
NuGet\Install-Package Aspose.TeX -Version 26.2.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="Aspose.TeX" Version="26.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspose.TeX" Version="26.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Aspose.TeX" />
                    
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 Aspose.TeX --version 26.2.0
                    
#r "nuget: Aspose.TeX, 26.2.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 Aspose.TeX@26.2.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=Aspose.TeX&version=26.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Aspose.TeX&version=26.2.0
                    
Install as a Cake Tool

Aspose.TeX for .NET

NuGet Version NuGet Downloads

Product Page | Docs | API Reference | Examples | Blog | Releases | Support | Temporary License

Aspose.TeX for .NET is a powerful library for typesetting TeX/LaTeX files and converting them to various output formats. It enables C#, VB.NET, and ASP.NET developers to create, process, and render LaTeX documents without installing any third-party TeX distribution.

Key Features

LaTeX Conversion

Convert LaTeX files to multiple output formats:

  • PDF — high-quality typeset documents
  • XPS — XML Paper Specification format
  • SVG — scalable vector graphics
  • PNG, JPEG, TIFF, BMP — raster image formats

Math Formula Rendering

Render LaTeX math formulas as standalone images:

  • Output to PNG (with configurable resolution) and SVG
  • Custom preamble support for math packages (amsmath, amsfonts, amssymb)
  • Configurable text color, background color, and scale

LaTeX Graphics

  • Include external graphics via \includegraphics (PNG, EPS, PDF)
  • Embed graphics directly using Base64 encoding

LaTeX File Repair

  • Validate and repair incomplete or broken LaTeX files
  • Automatically add missing preamble structures (\documentclass, \begin{document}, etc.)
  • Generate validation reports

Custom TeX Format

  • Create and use custom TeX format files
  • Support for ObjectTeX, ObjectLaTeX, and Plain TeX configurations

Supported File Formats

Format Input Output
Plain TeX (.tex) Yes Yes
LaTeX (.ltx, .tex) Yes Yes
PDF Yes
XPS Yes Yes
SVG Yes
PNG Yes
JPEG Yes
TIFF Yes
BMP Yes

Installation

Package Manager Console:

Install-Package Aspose.TeX

.NET CLI:

dotnet add package Aspose.TeX

PackageReference:

<PackageReference Include="Aspose.TeX" Version="*" />

Code Examples

Convert LaTeX to PDF

using Aspose.TeX;
using Aspose.TeX.IO;
using Aspose.TeX.Presentation.Pdf;

TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectLaTeX);
options.InputWorkingDirectory = new InputFileSystemDirectory("input");
options.OutputWorkingDirectory = new OutputFileSystemDirectory("output");
options.SaveOptions = new PdfSaveOptions();

new TeXJob("document.tex", new PdfDevice(), options).Run();

Render LaTeX Math Formula to PNG

using Aspose.TeX.Features;
using System.Drawing;
using System.IO;

PngMathRendererOptions options = new PngMathRendererOptions
{
    Resolution = 300,
    Scale = 1000,
    TextColor = Color.Black,
    BackgroundColor = Color.White
};

PngMathRenderer renderer = new PngMathRenderer();

using (Stream stream = File.Create("formula.png"))
{
    renderer.Render(@"\int_{0}^{\infty} e^{-x^2} dx = \frac{\sqrt{\pi}}{2}", stream, options);
}

Convert LaTeX to SVG

using Aspose.TeX;
using Aspose.TeX.IO;
using Aspose.TeX.Presentation.Svg;

TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectLaTeX);
options.InputWorkingDirectory = new InputFileSystemDirectory("input");
options.OutputWorkingDirectory = new OutputFileSystemDirectory("output");
options.SaveOptions = new SvgSaveOptions();

new TeXJob("document.tex", new SvgDevice(), options).Run();

Repair a Broken LaTeX File

using Aspose.TeX.Features;
using Aspose.TeX.IO;

LaTeXRepairerOptions options = new LaTeXRepairerOptions();
options.InputWorkingDirectory = new InputFileSystemDirectory("input");
options.OutputWorkingDirectory = new OutputFileSystemDirectory("output");

new LaTeXRepairer("broken.tex", options).Run();
// Output: broken-fixed.tex (repaired file) + broken.log (validation report)

Licensing

Aspose.TeX for .NET works in evaluation mode without a license, adding watermarks to the output. To remove evaluation limitations, apply a license before processing:

Aspose.TeX.License license = new Aspose.TeX.License();
license.SetLicense("Aspose.TeX.lic");

Get a temporary license for full-featured evaluation without watermarks.

Platform Support

Platform Versions
.NET Framework 4.0 and higher
.NET Standard 2.0
.NET 6.0, 7.0

Supported OS: Windows, Linux, macOS (any platform supporting .NET Standard 2.0+)

Resources

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Aspose.TeX:

Package Downloads
Aspose.Total

Aspose.Total for .NET is the most complete package of all .NET file format APIs offered by Aspose. It empowers developers to create, edit, render, print and convert between a wide range of popular document formats within any .NET, C#, ASP.NET and VB.NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
26.2.0 432 2/26/2026
25.12.0 2,158 12/19/2025
25.10.0 3,944 10/9/2025
25.8.0 3,468 8/17/2025
25.6.0 6,794 6/26/2025
25.4.0 10,584 4/11/2025
25.2.0 10,270 2/6/2025
24.12.0 12,316 12/13/2024
24.10.0 17,110 10/17/2024
24.9.0 4,888 9/5/2024
24.8.0 4,557 8/8/2024
24.7.0 3,826 7/1/2024
24.5.0 8,936 5/23/2024
24.3.0 9,714 3/12/2024
24.2.0 7,386 2/16/2024
23.12.0 15,365 12/15/2023
23.10.0 18,582 10/24/2023
23.8.0 28,002 8/14/2023
23.6.1 18,075 6/30/2023
Loading failed