Command-line tools#
texplain#
Create a clean output directory with only included files/citations.
usage: texplain [-h] [-c] [-v] input outdir
Positional Arguments#
- input
TeX file
- outdir
Output directory
Named Arguments#
- -c, --keep-comments
Keep comments
Default: False
- -v, --version
show program’s version number and exit
texcleanup#
Apply some simple clean-up rules. Most of the options are fully self explanatory, except for:
- --replace-command
It can replace a command by another command, or simply ‘remove’ it, keeping just a sequence of arguments. This option is very much like a LaTeX command, but applied to the source. For example:
--replace-command "{\TG}[2]" "#1"
Applied a change as follows:
>>> This is a \TG{text}{test}. <<< This is a test.
Note that the number of arguments defaults to 1 (above
[2]
fixes 2 arguments). Finally, commented text is ignored.
usage: texcleanup [-h] [-c] [-C] [-r cmd def] [-l old new] [-f]
[-F PREPEND_FORMAT_LABELS] [-s] [-v]
files [files ...]
Positional Arguments#
- files
TeX file
Named Arguments#
- -c, --remove-commentlines
Remove all lines that have only comments (excluding preamble).
Default: False
- -C, --remove-comments
Remove all comments (excluding preamble).
Default: False
- -r, --replace-command
Replace command (see above).
- -l, --change-label
Rename a specific label.
- -f, --format-labels
Automatically prepend labels with “fig:”, “eq:”, “tab:”, “sec:”, “ch:” (if needed).
Default: False
- -F, --prepend-format-labels
Automatically prepend labels with “fig:ARG”, “eq:ARG”, …; see –format-labels.
- -s, --use-cleveref
Change “Fig.~ref{…}” etc. to “\cref{…}”.
Default: False
- -v, --version
show program’s version number and exit
texindent#
Wrapper around latexindent.pl
with some additional rules. texplain.texindent
.
usage: texindent [-h] [-v] files [files ...]
Positional Arguments#
- files
TeX file
Named Arguments#
- -v, --version
show program’s version number and exit