# Does texlive comes with documentations of packages?

So I installed texlive on ubuntu using:

sudo apt-get install texlive-common


There are many packages that have been installed with this command. But do I also have the documentation of these packages installed? If the answer is yes, where can I find them on my file system? If the answer is no, can I install them using apt-get?

• TeX Live itself includes most documentation for most packages. Occasionally documentation is missing for licensing reasons. However, whether texlive-common installs the documentation for the packages it includes depends on your distro's packagers' decisions. However, typically I'd expect it to be included. texdoc <name of package> to show the documentation for a package texdoc -l <name of package> to list all documentation for the package. texdoc --help for more information. – cfr Jan 18 '16 at 22:50
• ...you can also access the documentations online from texdoc.net. – Werner Jan 18 '16 at 22:58
• @Werner I have noticed though at least on some packages that this links sometimes to documentation of perhaps one or two years ago, which might be outdated. Going to ctan is an alternative which always will link to up-to-date documentation. – user4686 Jan 19 '16 at 8:18
• @jfbu: Interesting. My first choice is CTAN for the documentation, followed by a local texdoc <pkg>, both of which are up-to-date for obvious reasons. So I don't know much about texdoc.net's "freshness"... – Werner Jan 19 '16 at 11:40
• random example: package mathastext is found in version Package version: 1.3d (2014/05/23), but there has been a number of updates after that. More serious: beamer is served as User Guide for version 3.33 but the current one is 3.36 (if my installation is up-to-date). – user4686 Jan 19 '16 at 11:56

TeX Live itself includes most documentation for most packages. Occasionally documentation is missing for licensing or other reasons. TeX Live typically notes this by placing a note in the documentation directory for the package with the suffix TEXLIVE. For example, here's the contents of texmf-dist/doc/latex/chessfss/:

README          README.TEXLIVE


README.TEXLIVE then tells us where the missing files can be found on CTAN:

The following files have been removed in the TeX Live installation of
the current package, typically due to duplication, lack of space, or
missing source code.  You can find these files on CTAN at
http://mirror.ctan.org/macros/latex/contrib/chessfss
If questions or concerns, email tex-live@tug.org.

chessfonts_gallery.pdf
chessfss.pdf


Whether texlive-common installs the documentation for the packages it includes depends on your distro's packagers' decisions. However, typically I'd expect documentation to be included if it is included in TeX Live.

texdoc <name of package>


shows the documentation for package <name of package>. Sometimes a package includes several separate kinds of documentation. In that case, the above incantation may not display the documentation you want. In some cases, texdoc's choice is, in fact, unlikely to be the most useful. For example, it might display the source code rather than the instructions for end-users.

texdoc -l <name of package>


lists all documentation for the package <name of package>. If you select one of the options, it will then be displayed.

texdoc -h


Usage: texdoc [OPTION]... NAME...
or:  texdoc ACTION

Try to find appropriate TeX documentation for the specified NAME(s).
Alternatively, perform the given ACTION and exit.

Current settings: --view, --interact (default).

Actions:
-h, --help            Print this help message.
-V, --version         Print the version number.
-f, --files           Print the list of configuration files used.
--just-view file      Display file, given with full path (no searching).

Options:
-w, --view            Use view mode: start a viewer. (default)
-m, --mixed           Use mixed mode (view or list).
-l, --list            Use list mode: show a list of results.
-s, --showall         Use showall mode: show also "bad" results.

-i, --interact        Use interactive menus. (default)
-I, --nointeract      Use plain lists, no interaction required.
-M, --machine         Machine-readable output for lists (implies -I).

-q, --quiet           Suppress warnings and most error messages.
-v, --verbose         Print additional information (eg, viewer command).
-d, --debug[=list]    Activate debug output (restricted to list).

Environment: PAGER, BROWSER, PDFVIEWER, PSVIEWER, DVIVIEWER.
Files: <texmf>/texdoc/texdoc.cnf, see output of the --files option.
Report bugs to <texdoc@tug.org>.
Full manual available via texdoc texdoc'.


Note that, in most cases, texdoc will open a PDF in your default viewer. Sometimes, the documenation is in HTML format or, for older packages, it may open a DVI instead. Where nothing like this is available, it will display a plain text file or whatever it can find.

Some packages have no documentation as such but do have instructions on use in comments at the top of the source file. Or their documentation may not include any actual instructions. For example,

texdoc setspace


returns the following

setspace -- control line spacing in latex documents

This release is a transitional one, with code unchanged from Geoffrey
Tobin's LaTeX 2.09 original, except for patches that avoid a problem
with \@setsize, when the package is used with other 2.09 packages
under LaTeX 2e.

The package now acts "natively" as a 2e package under LaTeX 2e, and
(insofar as is possibe) as a 2.09 package under LaTeX 2.09.

Please report any problems to Robin Fairbairns <rf10@cam.ac.uk>
(A revised version of setspace-test.tex, that shows the problem
reported, will be much appreciated.)


That's great, but probably not much help. However, setspace.sty includes instructions at the top of the file.

%%% ======================================================================
%% FILE:   setspace.sty in SYS2.TEX.PUB.ISULATEX.STYLES
%% AUTHOR: Erica M. S. Harris
%% DATE:   April 1990
%% MOD:    March 1991
%%%
%%% Update to LaTeX (2e) :  6 Feb 1996.
%%% Description:  LaTeX Document Package "setspace"
%%%
%%% Usage:
%%%                \documentclass[...]{...}
%%%                \usepackage{setspace}
%%%
%%         Based on the doublespace option created by Stephen Page.
%%
%%         This style option provides commands and environments for doing
%%         double and  one-and-a-half spacing based on pt size.
%%
%%         Single spacing is the default.
%%
%%         Three commands, \singlespacing, \onehalfspacing, and
%%         \doublespacing, are for use in the preamble to set the overall
%%         spacing for the document.  If a different spacing is required then
%%         the \setstretch{baselinestretch} command can be used in the
%%         preamble to set the baselinestretch appropriately.  The default
%%         spacing with this style option is single spacing.
%%
%%         Three environments, singlespace, onehalfspace, and doublespace,
%%         allow the spacing to be changed within the document.  Both the
%%         onehalfspace and doublespace environments are intended to increase
%%         the spacing, so the onehalfspace environment should not be used in
%%         a double spaced document.  If an increased spacing different from
%%         one-and-a-half or double spacing is required then the spacing
%%         environment can be used.  The spacing environment takes one
%%         argument which is the larger baselinestretch to use,
%%         e.g., \begin{spacing}{2.5}.
%%
%%         \footins is adjusted the same as \parskip - appears to work. Lose
%%         stretch parts but don't consider that to be crucial
%%
%%         Removed code for altering spacing before and after displayed
%%         equations - just looked too much.
%%
%% MODS:
%%         Redefinition of \spacing and \endspacing for consistency with
%%         TeX 3.x inserted by George Greenwade.  Modification provided by
%%         Philip Ross (ROSS@UK.AC.ABDN.BIOMED) and John Byrne via INFO-TeX.
%%
%%
%%   Old Documentation follows:
%%         1. A new environment "singlespace" is provided, within which single
%%            spacing will apply.
%%            JFL - changed so that it works in regular text and so that
%%            vertical space before and after is correctly computed
%%         2. Double spacing is turned off within footnotes and floats (figures
%%            and tables).
%%         3. Proper double spacing happens below tabular environments and in
%%            other places where LaTeX uses a strut.
%%         4. Slightly more space is inserted before footnotes.
%%         5. JFL - fixes spacing before and after displayed math
%%
%%
%%    mods:   Jean-Francois Lamy
%%            lamy@ai.toronto.edu
%%            lamy@utai.uucp
%%
%% POSSIBLE BUGS:
%%    . Increasing struts may possibly cause some other obscure part of
%%      formatting to fall over.
%%    . \begin{singlespace}\begin{quote} produces the wrong spacing before
%%      the quote (extra glue is inserted).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
`