7

I know it's convenient to install packages with tlmgr install <package>, but I couldn't find a way to open the documentation of the respective package; I know it installs them, I can manually go to the folder where they're installed (which is also not easy to find).

So what's the best alternative to do something similar to tlmgr docs <package>?

Edit: I'm using BasicTeX.

3
  • 5
    texdoc <package> should work too.
    – user31729
    Mar 2, 2016 at 20:56
  • @ChristianHupfer It's not installed in my PC. I'm using BasicTeX.
    – user14492
    Mar 2, 2016 at 20:57
  • If you want a minimal installation, there are also texdoc online, and CTAN.
    – Fran
    Jul 1, 2020 at 18:03

2 Answers 2

7
+50

This is supposed to be a comment, but I do not have enough reputation to do that.

I think this script may help. It says (I changed it a little bit):

  1. Install texdoc by

    tlmgr install texdoc
    
  2. Enable automatic build of documentation, which is disabled (by default) for BasicTeX tlmgr:

    tlmgr option docfiles 1
    
  3. Build documentation for all installed packages:

    tlmgr install --reinstall $(tlmgr list --only-installed | sed -E 's/i (.*):.*$/\1/')
    

    The tlmgr list format is i <pkg-name>: <description> so we get the name with sed. I used ERE (Extended Regular Expression) since BasicTeX is only available on OS X, where ERE is available with -E. Note that tlmgr list --only-installed and tlmgr info --only-installed seems to be the same, checked with Bash process substitution and diff.

In some of the steps above you may need sudo (depending on how you installed BasicTeX). Use it wisely. This answer is related, I think.

5

You need to install texdoc on BasicTeX with tlmgr install texdoc in order to be able to run texdoc <package>.

You must log in to answer this question.

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