Create custom TeX format

Craft custom TeX formats with our customizable TeX format creation API for C++. Explore new possibilities and enhance your content with ease!


Take control of TeX formatting with our C++ API solution! Create tailored TeX formats that match your unique needs effortlessly. Whether you’re creating specialized documents or seeking uniformity in your projects, our API empowers you to define custom TeX formats with ease. Unlock limitless possibilities for document creation and formatting in C++. Boost your content to new heights with our TeX format customization API and experience the freedom to design documents your way by trying a free trial or buying a license!

TeX is a data markup language and the core of the computer typesetting system known as the publication set system. While it is often referred to as a file format, it is actually a programming language and interpreter engine used for the creation of mathematical or technical documents. Many packages have been created based on TeX to simplify the processing of documents with formulas or math equations. The Aspose.TeX API solution offers the ability to create custom TeX files with personalized engine options. Here you will find an example of how to create a custom TeX format. But first, install the Aspose.TeX API. You can do it either by searching for it in the NuGet package manager or by using the Install-Package Aspose.TeX command in the Package Manager Console.

Package Manager Console Command

    PM> Install-Package Aspose.TeX

Steps to create a custom TeX file C++.

  1. Create typesetting options for the ObjectTeX engine extension with no format. Create an instance of the TeXOptions Class, and set it to use the ConsoleAppOptions() Method of the TeXConfig Class, with the ObjectIniTeX option specified.
  2. Set the input working directory for the options object to the input directory, and the output working directory for the options object to the output directory.
  3. After that, run the format creation, using the CreateFormat() Method of the TeX class, with customtex as the format name, and the options object as the parameter.
  4. Call the WriteLine() Method of the Writer property of the TerminalOut property of the options object, which will write an additional line to the output.
  5. Refine the output.

C++ Code to customize TeX files

    using Aspose::TeX::IO;
    using Aspose::TeX;
    // Create typesetting options for no format on the ObjectTeX engine extension.
    System::SharedPtr<TeXOptions> options = TeXOptions::ConsoleAppOptions(TeXConfig::get_ObjectIniTeX());
    // Specify a file system working directory for the input.
    // Specify a file system working directory for the output.

    // Run format creation.
    Aspose::TeX::TeX::CreateFormat(u"customtex", options);

    // For further output to look write.

TeX What is TeX File Format

TeX is not actually a format. It is both a programming language and also an interpreter engine that understands this language. A TeX file is a plain text file created using TeX syntax to be converted to some target format by being processed by a TeX engine. This output document may include graphics, tables, lists, formulas, and equations.