Scroll to navigation

LATEX2TEXT(1) User Commands LATEX2TEXT(1)

NAME

latex2text - part of pylatexenc: simple LaTeX parser provider conversion to/from unicode

DESCRIPTION

usage: latex2text [--code LATEX_CODE] [--tolerant-parsing]

[--no-tolerant-parsing] [--math-mode {text,with-delimiters,verbatim,remove}] [--fill-text [FILL_TEXT]] [--keep-comments] [--no-keep-comments] [--strict-latex-spaces {off,on,based-on-source,macros,except-in-equations}] [--keep-braced-groups] [--no-keep-braced-groups] [--keep-braced-groups-minlen KEEP_BRACED_GROUPS_MINLEN] [-q] [-v] [--version] [--help] [FILE [FILE ...]]

Input options:

Convert the given LATEX_CODE to unicode text instead of reading from FILE or standard input. You cannot specify FILEs if you use this option, and any standard input is ignored.
Input files to read LaTeX code from. If no FILE(s) is/are specified, LaTeX code is read from standard input unless --code is specified

LatexWalker options:

--tolerant-parsing

Tolerate syntax errors when parsing, and attempt to continue (default yes)

LatexNodes2Text options:

How to handle chunks of math mode LaTeX code. 'text' = convert to text like the rest; 'with-delimiters' = same as 'text' but retain the original math mode delimiters; 'verbatim' = keep verbatim LaTeX code; 'remove' = remove from input entirely
Attempt to wrap text to the given width, or 80 columns if option is specified with no argument

--keep-comments

Keep LaTeX comments in text output (default no)
How to handle whitespace. See documentation for the class LatexNodes2Text().

--keep-braced-groups

Keep LaTeX {braced groups} in text output (default no)
Only apply --keep-braced-groups to groups that contain at least this many characters

General options:

Suppress warning messages
Verbose output
Show version information and exit
Show this help information and exit

AUTHORS


pylatexenc was primarily written by Philippe Faist.

SEE ALSO


This script is part of pylatexenc. Full documentation for the pylatexenc suite
can be consulted at https://pylatexenc.readthedocs.io .

June 2021 latex2text 2.10