LinuxCommandLibrary

texdoc

View documentation for LaTeX packages and programs

TLDR

Open the first search result in the default PDF viewer

$ texdoc [search]
copy

List the best search results
$ texdoc [[-l|--list]] [search]
copy

Open full documentation of texdoc
$ texdoc [texdoc]
copy

SYNOPSIS

texdoc [options] [ ...]

PARAMETERS

-h, --help
    Display help message and exit.

-V, --version
    Display version information and exit.

-s, --show-path
    Show the path(s) searched for documentation.

-l, --list
    List all matching documentation files without displaying them.

-n, --no-view
    Do not automatically view the documentation file.

-e, --engine=
    Specify the engine to use for viewing. (e.g. pdftex, xetex, luatex).

-f, --format=
    Specify the format of the file to search for. (e.g. pdf, txt, dvi).

-q, --quiet
    Suppress verbose output.

-m, --mixed-case
    Enable mixed-case matching for the documentation name.

--view
    Forces documentation viewing, even if documentation contains errors.


    The name of the documentation to search for. Multiple names can be provided.

DESCRIPTION

The `texdoc` command is a utility for locating and displaying documentation related to TeX packages, classes, programs, and other related items. It searches a database of available documentation files and presents the user with a list of matching documents, allowing them to choose which one to view. `texdoc` supports various viewers (like `xdg-open`, `pdf viewer, text viewer`), configurable through environment variables and configuration files, and can display documentation in different formats. It significantly simplifies the process of finding and accessing documentation compared to manually searching through TeX directories. `texdoc` is crucial for anyone working with TeX, LaTeX, and related tools to quickly access the necessary information for using different packages and programs.

CONFIGURATION

The behavior of `texdoc` can be customized through configuration files.
These files typically reside in the `TEXMFHOME/texdoc/texdoc.cnf` or `TEXMFCONFIG/texdoc/texdoc.cnf` location, but location may vary depending on TeX distribution.
They allow you to set default viewer programs, modify search paths, and other options.

ENVIRONMENT VARIABLES

Several environment variables influence `texdoc`'s behavior:
TEXMFHOME, TEXMFCONFIG, TEXMFVAR, TEXMFDIST, TEXDOC, TEXDOCVIEWER.
These variables control the location of configuration files and viewer preferences.

DATABASE

texdoc depends on a database of documentation files, typically generated using `mktexlsr`.
This database maps package names to their corresponding documentation files.
Keeping this database up-to-date is crucial for `texdoc` to function correctly.

SEE ALSO

mktexlsr(1), tex(1), latex(1)

Copied to clipboard