I don't need the documentation for every single package that I have installed (it would take several GB on my disk for no reason). However, I'd like to download the documentation for a small number of packages that I frequently need to look up. I'd like to be able to just run texdoc and see the documentation, rather than needing to look up the correct file on CTAN or texdoc.org.

I know that it's possibly to enable installation of documentation globally by running tlmgr option docfiles 1. Can I ask tlmgr to only install documentation for certain packages that I list?

Bonus question: if it's possible to do the same thing for sources, I'd be happy to hear about it. I imagine that if one is possible, the solution for the other shouldn't be too different. If not, ignore this.


1 Answer 1


Quickly looking at the manual for tlmgr (tlmgr help) it lists

install [option...] pkg...
    Install each pkg given on the command line, if it is not already
    installed. It does not touch existing packages; see the "update" action
    for how to get the latest version of a package.

    By default this also installs all packages on which the given pkgs are
    dependent. Options:

        Nothing is actually installed; instead, the actions to be performed
        are written to the terminal.

        Instead of fetching a package from the installation repository, use
        the package files given on the command line. These files must be
        standard TeX Live package files (with contained tlpobj file).

        If updates to "tlmgr" itself (or other parts of the basic
        infrastructure) are present, "tlmgr" will bail out and not perform the
        installation unless this option is given. Not recommended.

        Do not install dependencies. (By default, installing a package ensures
        that all dependencies of this package are fulfilled.)

        Normally, when you install a package which ships binary files the
        respective binary package will also be installed. That is, for a
        package "foo", the package "foo.i386-linux" will also be installed on
        an "i386-linux" system. This option suppresses this behavior, and also
        implies "--no-depends". Don't use it unless you are sure of what you
        are doing.

        Reinstall a package (including dependencies for collections) even if
        it already seems to be installed (i.e, is present in the TLPDB). This
        is useful to recover from accidental removal of files in the

        When re-installing, only dependencies on normal packages are followed
        (i.e., not those of category Scheme or Collection).

        While not recommended, the "install-tl" program provides an option to
        omit installation of all documentation and/or source files. (By
        default, everything is installed.) After such an installation, you may
        find that you want the documentation or source files for a given
        package after all. You can get them by using these options in
        conjunction with "--reinstall", as in (using the "fontspec" package as
        the example):

          tlmgr install --reinstall --with-doc --with-src fontspec

Thus if you have an installation without doc and src you can install it for a single package via

tlmgr install --reinstall --with-doc --with-src packagename

(my home PC has limited space, so I do the same if needed)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .