Scroll to navigation

TRALICS(1) User Commands TRALICS(1)

NAME

tralics - translate LaTeX documents into XML

SYNOPSIS

tralics [options] source

DESCRIPTION

Tralics reads LaTeX source and produces semantic XML, including MathML for mathematics. The source filename may be given with or without its .tex extension and must not start with a hyphen. XML output is encoded in UTF-8.

Tralics implements TeX commands and provides its own package and class files. It does not use a full LaTeX installation to typeset the input document.

Options accept either one or two leading hyphens. Hyphens and underscores within option names are optional. An option argument may follow a space or an equals sign; for example, -input_path directory and -input_path=directory are equivalent.

OPTIONS

General options

Display the command-line help and exit.
Display version information and exit.
Enable additional TeX tracing in the transcript file.
Accepted for compatibility. In version 3.0.1 this option does not reduce terminal output.

Input and output

Read the specified source file instead of supplying a positional source argument. Only one source file may be specified.
Search a colon-separated list of directories for input files. An empty component or a dot denotes the current directory, which is also searched if not explicitly listed. -input_dir is an alias.
Write generated XML, transcript and auxiliary files in this directory. The default is the directory containing the source file.
Set the XML output name; Tralics appends .xml. The default is the source basename without its extension. -o is an alias.
Set the transcript filename, replacing its extension with .log. A relative filename is resolved in the output directory. The default is the source basename with a .log extension.

Configuration and document type

Override the document type selected by the document class.
Read a particular document configuration file. A name without a .tcf extension has that extension added when searched in the configuration directories. A pathname beginning with a dot or slash is used directly. -config_file is an alias.
Search this directory for Tralics configuration and support files. The directory should contain article.clt.
Do not read a document configuration file. Class and package support files are still used.
Load class.clt when the class named by the document is unavailable.
Override a configuration parameter. The form -param=name=value is also accepted.
Set the XML root element name and optional DTD system identifier. Separate them by whitespace within one quoted argument, for example, -doctype 'document document.dtd'.
Control translation when the configuration defines a title page. all translates the whole document; title translates only the title page; config uses the action specified by the configuration, which is the default.

Encoding and quotation marks

Select the default input encoding: UTF-8 or ISO-8859-1 (Latin-1). The default is Latin-1. An encoding declaration on a file's first line can override this choice. XML and transcript output remain UTF-8.
Set the Unicode character used for a backquote, as a hexadecimal code point. The default is 2018 (U+2018).
Set the Unicode character used for an apostrophe, as a hexadecimal code point. The default is 2019 (U+2019).
Use U+00B4 for an apostrophe, equivalent to -right_quote=B4.
Translate double quotes into paired opening and closing quotation marks.

XML and mathematics

Choose named entities such as α or numeric character references such as α for mathematical characters. The values yes and no are also accepted. Named entities require definitions in the document's DTD.
Use numeric character references, equivalent to -entnames=false.
Represent formulas in TeX form instead of MathML.
Include both MathML and the LaTeX representation of formulas.
Use MathML mathvariant attributes for mathematical fonts, or use the corresponding Unicode characters. The latter is the default.
Allow equation numbers and labels on individual rows within a formula, or restrict a formula to one label. The latter is the default.
Select simplified XML representations for small formulas with a bit mask from 0 to 7. Add 1 for ordinal-like expressions, 2 for single symbols, and 4 for isolated subscripts and superscripts. Zero disables these simplifications and is the default in version 3.0.1.
Disable simplified formula representations, equivalent to -trivialmath=0.
Enable or disable e-TeX extensions. They are enabled by default.
Disable special postprocessing of figures and tables.
Use the zero-width space character U+200B instead of a <zws/> element when separating characters to prevent ligatures.
Do not insert these zero-width separators.
Do not insert error elements in the XML output.
After reporting an undefined command, define a fallback for it so later occurrences do not produce the same undefined-command error.

Other translation options

Keep bibliography fields that would otherwise be filtered according to the entry type.
Allow shell commands requested with the TeX \write18 command.
Load the LaTeX3 support code before translating the document.

COMPATIBILITY

The former output-encoding options -utf8output, -oe8, -oe1, -oe8a, -oe1a, -te8, -te1, -te8a and -te1a are accepted with an obsolete-option warning and have no effect. Output is always UTF-8.

The former interactive mathematics options -interactivemath and -i are also obsolete and ignored.

FILES

/usr/share/tralics/confdir
Packaged configuration files, class definitions (.clt), and package implementations (.plt).

ENVIRONMENT

Override the configuration directory. The directory must contain article.clt.
May influence configuration lookup through kpsewhich(1) when that optional TeX utility is available.

Without an explicit configuration directory, Tralics also searches for its installed support files relative to the executable location.

EXAMPLES

Translate a UTF-8 document and write output alongside its source:

tralics -utf8 document.tex

Write the XML and transcript in an existing output directory, using numeric character references for mathematical entities:

tralics -utf8 -output_dir output -noentnames document.tex

SEE ALSO

bibtex(1), kpsewhich(1)

Tralics documentation.

AUTHORS

Originally written by Jose Grimm at Inria; maintained by Vincent Beffara. This manual page was updated for Debian, based on the original manual by Ross J. Reedstrom and the current command-line help and documentation.

2026-10-31 Tralics 3.0.1