table of contents
| 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¶
- -help, --help
- Display the command-line help and exit.
- -version, --version
- Display version information and exit.
- -verbose, -v
- Enable additional TeX tracing in the transcript file.
- -silent
- Accepted for compatibility. In version 3.0.1 this option does not reduce terminal output.
Input and output¶
- -input_file file
- Read the specified source file instead of supplying a positional source argument. Only one source file may be specified.
- -input_path path
- 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.
- -output_dir directory
- Write generated XML, transcript and auxiliary files in this directory. The default is the directory containing the source file.
- -output_file name
- Set the XML output name; Tralics appends .xml. The default is the source basename without its extension. -o is an alias.
- -log_file file
- 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¶
- -type type
- Override the document type selected by the document class.
- -config file
- 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.
- -confdir directory
- Search this directory for Tralics configuration and support files. The directory should contain article.clt.
- -noconfig
- Do not read a document configuration file. Class and package support files are still used.
- -default_class class
- Load class.clt when the class named by the document is unavailable.
- -param name value
- Override a configuration parameter. The form -param=name=value is also accepted.
- -doctype specification
- 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'.
- -tpa_status mode
- 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¶
- -utf8, -latin1
- 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.
- -left_quote hex
- Set the Unicode character used for a backquote, as a hexadecimal code point. The default is 2018 (U+2018).
- -right_quote hex
- Set the Unicode character used for an apostrophe, as a hexadecimal code point. The default is 2019 (U+2019).
- -nostraightquotes
- Use U+00B4 for an apostrophe, equivalent to -right_quote=B4.
- -usequotes
- Translate double quotes into paired opening and closing quotation marks.
XML and mathematics¶
- -entnames true|false
- 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.
- -noentnames
- Use numeric character references, equivalent to -entnames=false.
- -nomathml
- Represent formulas in TeX form instead of MathML.
- -dualmath
- Include both MathML and the LaTeX representation of formulas.
- -math_variant, -no_math_variant
- Use MathML mathvariant attributes for mathematical fonts, or use the corresponding Unicode characters. The latter is the default.
- -multi_math_label, -no_multi_math_label
- Allow equation numbers and labels on individual rows within a formula, or restrict a formula to one label. The latter is the default.
- -trivialmath number
- 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.
- -notrivialmath
- Disable simplified formula representations, equivalent to -trivialmath=0.
- -etex, -noetex
- Enable or disable e-TeX extensions. They are enabled by default.
- -no_float_hack
- Disable special postprocessing of figures and tables.
- -nozerowidthelt
- Use the zero-width space character U+200B instead of a <zws/> element when separating characters to prevent ligatures.
- -nozerowidthspace
- Do not insert these zero-width separators.
- -noxmlerror
- Do not insert error elements in the XML output.
- -noundefmac
- After reporting an undefined command, define a fallback for it so later occurrences do not produce the same undefined-command error.
Other translation options¶
- -raw_bib
- Keep bibliography fields that would otherwise be filtered according to the entry type.
- -shell-escape
- Allow shell commands requested with the TeX \write18 command.
- -l3
- 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¶
- TRALICSCONFDIR
- Override the configuration directory. The directory must contain article.clt.
- TEXINPUTS
- 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¶
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 |