Customize output

.NET API Solution to customize output of TeX files

 

TeX is known as a typesetting language. It means that you do not format your text in the document, but enter the plain text along with the commands.

The article TeX I/O of the Documentation teaches us that a TeX file may not contain any data to typeset but only control sequences. Yet it usually contains such data, and a file in the target format has the typeset text. The file will also have the same name as the file specified as the input and is the main output file. For the original TeX, this is a file in DVI format. We will call the name of both input and output files without extending the job name.

On this page, you will find a code example explaining creating a custom TeX format file where you can see how to customize the output of TeX files. To customize .tex files output we need:

  • Aspose.TeX for .NET API which is a feature-rich, powerful and easy-to-use document manipulation and conversion API for C# platform.

  • Open the NuGet package manager, and search for Aspose.TeX and install. You may also use the following command from the Package Manager Console.

Package Manager Console Command


    PM> Install-Package Aspose.TeX

Steps to customize TeX output C#:

  1. With the help of the ConsoleAppOptions() Method of TeXOptions Class, create TeX engine options for no format upon ObjectTeX engine extension.
  2. Use InputFileSystemDirectory Class to specify a file system working directory for the input.
  3. Use OutputFileSystemDirectory Class to specify a file system working directory for the output.
  4. To create the new format use TeXJob.CreateFormat() Method.
  5. Refine the output.

C# Code for TeX output customization

    using Aspose.TeX.IO;
    using Aspose.TeX;
    // Create the TeX engine options for no format upon ObjectTeX engine extension.
    TeXOptions options = TeXOptions.ConsoleAppOptions(TeXConfig.ObjectIniTeX);

    // Specify a file system working directory for the input.
    options.InputWorkingDirectory = new InputFileSystemDirectory(RunExamples.InputDirectory);

    // Specify a file system working directory for the output.
    options.OutputWorkingDirectory = new OutputFileSystemDirectory(RunExamples.OutputDirectory);

    // Run the format creation.
    TeXJob.CreateFormat("customtex", options);

    // For further output to look fine.
    options.TerminalOut.Writer.WriteLine();



FAQ

1. How do I make a LaTeX file?

Aspose.TeX Solution allows you to create a LaTeX file online. Just use one of the cross-platform applications : LaTeX Equation Editor, LaTeX Editor or LaTeX Table Generator. They let you generate files in just a few moments.

2. How to work with the output of a TeX file?

To manipulate the output of TeX using Aspose.TeX API Solution, use the Output Classes of the Aspose.TeX.IO namespace.

3. How do I view LaTeX output?

To View TeX/LaTeX files online there are free Viewer applications. With them, you will need only to upload files and get the result on the screen in just a moment.

4. How to customize the output of a TeX file?

To customize the output of a TeX file using this API Solution you need to create TeX engine options. Then specify a file system working directory for the input using the OutputFileSystemDirectory Class.

TEX What is TEX File Format

TeX is not actually a format. It is at the same time a programming language and also an interpreter engine that understands this language. A TeX file is a document created in LaTeX. This document can include graphics, tables, symbols, lists, formulas, and equations.