Convert LaTeX to SVG Image in C#

The TeX is a language that consists of programming as well as mark-up syntax. LaTeX is the most commonly used format which integrates different document styles like books, letters, statements, etc. In some use cases, you may want to convert TeX files to SVG images. Accordingly, this article covers, how to convert TeX to SVG image programmatically in C#.

TeX to SVG Image Converter – C# Free API Download

Aspose.TeX for .NET API can be used to typeset TeX files to different file formats. It can be used to create, manage, or convert different structured documents. Simply download the reference DLL file from the New Releases page, or run the following installation command to configure it from the NuGet gallery:

PM> Install-Package Aspose.TeX

Convert LaTeX TeX to SVG in C# - Step by Step Guide

You can convert a LaTeX TeX file to an SVG image by following the steps below:

  1. Create conversion options for Object LaTeX format.
  2. Specify a file system working directory.
  3. Initialize the options for saving the SVG image.
  4. Run LaTeX to SVG image conversion.

Convert TeX LTX to SVG Image Programmatically in C#

You need to follow the following steps to convert a LaTeX file to an SVG image:

  1. Create conversion options with the TeXOptions class.
  2. Set the file system working directory to generate the output file.
  3. Initialize a SvgSaveOptions class instance.
  4. Run LaTeX to SVG image conversion with the TexJob class instance.

The code snippet below shows how to convert LaTeX to SVG image programmatically in C#:

Get Free Evaluation License

You may request a free temporary license which enables you to avoid any evaluation limitations of the API.

Conclusion

In this article, you have explored how to convert a LaTeX TeX LTX file to an SVG (Scalable Vector Graphics) image programmatically in C#. Furthermore, you may visit the documentation section to learn various other features of the API. In case of any concerns or ambiguities, please feel free to write to us at forum.

See Also