How to find the documentation for a package?

There are at least four ways to find the documentation of a package or class.

1. texdoc

Both TeXLive and MikTeX provide the texdoc command line tool which will usually find the correct documentation for a package with the following command:

 texdoc <package-name>

For example, to find the TikZ (or pgf) manual you can just type:

texdoc pgf

If that doesn't bring up the right documentation, (it usually does) you can ask it to provide a list of possible options by entering:

texdoc -s <package-name>

This will give you a numbered list of possible documents to choose from.

Distribution differences

If you install TeXLive, documentation for packages is included by default with a full installation.

If you install MikTeX, documentation may not be installed by default and you may need to use the package manager to install it.

2. From within your editor

Many TeX IDEs provide access to texdoc through a menu item. This will depend on the actual editor, but looking in the Help menu is usually a place to start.

3. texdoc.net

There is an online version of texdoc that allows you to get the PDF documentation through the web directly: The URL will have the form:

http://texdoc.net/pkg/<packagename>

So for your example:

http://texdoc.net/pkg/pgf

4. CTAN

All of the packages in TeXLive and MikTeX are hosted on https://www.ctan.org/, the Comprehensive TeX Archive Network.

As a last resort you can search there for the package and its documentation will be there too.

Documentation of the core LaTeX commands

If you want to find documentation of commands that are part of the LaTeX kernel, you can find them documented in the following documents. The first documents the basic LaTeX commands, and the second documents the new LaTeX3 commands that have been added in recent years.

 texdoc latex2e 

 texdoc interface3