texdoc
View TeX/LaTeX package documentation from TeX Live
TLDR
SYNOPSIS
texdoc [options] name...
DESCRIPTION
texdoc finds and displays documentation for TeX, LaTeX, ConTeXt, and related packages installed in a TeX Live distribution. It searches TEXMF trees for files associated with a package — usually a PDF manual but sometimes README, .txt, or .html — and opens the best match in a configured viewer.When multiple matches exist, -l prompts for a selection and -s broadens the search to the documentation contents (using the texdoc-fulltext index). The viewer is selected from configuration (**~/.texlive*/texmf-config/texdoc/texdoc.cnf) or from the PDFVIEWER / BROWSER** environment variables.
PARAMETERS
-l, --list
Show numbered list of matches; prompt to choose one.-s, --search
Full-text search across the documentation tree.-I, --interact
Force interactive mode (opposite of --nointeract).-M, --machine
Machine-readable output: one line per match (file path, score, name).-f, --files
Print matching file paths instead of opening them.-w, --view
View documentation (default action).-m, --mixed
Combine name search and full-text search (useful when names overlap with content).--viewer CMD
Override the configured PDF viewer.-D, --debug
Print debug output to stderr.-q, --quiet
Suppress informational messages.-v, --verbose
Increase verbosity.-V, --version
Show texdoc version.
CONFIGURATION
texdoc.cnf
Per-user configuration controlling viewer selection, mode aliases, and language preferences. Searched in TEXMFCONFIG, TEXMFVAR, TEXMFHOME, etc.TEXDOCS
kpathsea variable controlling where texdoc looks for documentation files.
CAVEATS
Requires a TeX Live (or MiKTeX) installation with documentation packages installed; minimal "scheme-small" installs ship without docs. Not all packages provide documentation in PDF form. Full-text search depends on the texdoc-fulltext package being installed.
HISTORY
texdoc is part of TeX Live, written in Lua and bundled with luatex. Earlier shell-script versions were superseded by the Lua implementation in TeX Live 2009.
