← 返回命令列表

Linux command

texdoc 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Open the documentation

texdoc [package-name]

List matching docs

texdoc -l [package-name]

Full-text search

texdoc -s [query]

Open in a specific PDF viewer

texdoc --viewer=[evince] [package-name]

Show file paths

texdoc -f [package-name]

Interactively pick

texdoc -I [package-name]

Open multiple packages

texdoc [package1] [package2] [package3]

说明

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.

参数

-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.

FAQ

What is the texdoc command used for?

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.

How do I run a basic texdoc example?

Run `texdoc [package-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l, --list do in texdoc?

Show numbered list of matches; prompt to choose one.