Customize output

.NET API Solution to customize TeX output

 

TeX is known as a typesetting language. This means that you do not format your text in the document, but enter plain text containing the text fragments of the document along with commands that control the output.

The TeX I/O article of the Documentation explains that a TeX job typically produces a main output file that contains the resulting document and a transcript (or log) file.

On this page, you will find some tips on how to customize the output of a TeX job. To customize TeX output we need:

  • The 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, search for Aspose.TeX, and install it. You may also use the following command from the Package Manager Console:

Package Manager Console Command

PM> Install-Package Aspose.TeX

Tips on how to customize TeX output C#:

  1. The TeX engine can access data volumes only as files, which means ‘by name’. Therefore, the TeX output subsystem provides data ‘slots’ in response to queries by name.
  2. The Aspose.TeX for .NET API defines the IOutputWorkingDirectory interface, which includes only one own method GetOutputFile(). It is that method that returns data ‘slots’ by name. In other words, an Output Working Directory is actually a dictionary that maps file names to ‘data slots’. Note that TeX may write a file and then read it. This is why IOutputWorkingDirectory extends the IInputWorkingDirectory interface.
  3. Along with the ‘data slot’, the GetOutputFile() method returns (within an object of the composite NamedStream class) the ‘full name’ of the file which you may need in your custom implementations of the interface.



FAQ

1. How do I write output from TeX and LaTeX?

In primitive TeX there are three commands responsible for outputting to files other than the main output file: \openout<number>=<file name>, \closeout<number>, and \write<number>{<token list>}. The first two commands open and close auxiliary files for writing, while the last one writes a list of tokens (which may constitute some text, for example) as a line of text. In LaTeX, such output to auxiliary files is typically hidden from the user within LaTeX itself or within packages.

2. How to work with TeX output?

To obtain TeX output in the most common ways (as files on disk or files packed in a ZIP archive) using the Aspose.TeX API Solution, use classes that implement the IOutputWorkingDirectory interface.

3. How do I view LaTeX output?

To view TeX/LaTeX files online there are free Viewer applications. With them, all you have to do is upload TeX/LaTeX files and in a moment get the result on the screen.

4. How to customize TeX output?

To customize TeX output using this API Solution, you need to develop your own implementation of the IOutputWorkingDirectory interface and then use it as the value of the OutputWorkingDirectory property in TeX job options.

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.