Friday, July 12, 2019

Looking up TexLive Package Name using .sty Filename

I am using TexLive, and sometimes it reports that it cannot locate a .sty file. It is not always the case that the package name is identical to the .sty filename (less the extension). For instance, when LaTeX reports that it cannot locate manyfoot.sty. The following will fail because the package that has manyfoot.sty isn't manyfoot.

$ tlmgr install manyfoot
tlmgr.pl: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr.pl install: package manyfoot not present in repository.
tlmgr.pl: action install returned an error; continuing.
tlmgr.pl: An error has occurred. See above messages. Exiting.

A method to figure out the package name is to use tlmgr to search TexLive repositories, i.e.,

tlmgr search --global --file STY_FILE_NAME

For the example of manyfoot.sty, we do,

$ tlmgr search --global --file  manyfoot.sty
tlmgr.pl: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
lwarp:
        texmf-dist/tex/latex/lwarp/lwarp-manyfoot.sty
ncctools:
        texmf-dist/tex/latex/ncctools/manyfoot.sty

after which we do,

$ tlmgr install ncctools
tlmgr.pl: package repository http://ctan.math.utah.edu/ctan/tex-archive/systems/texlive/tlnet (not verified: gpg unavailable)
[1/1, ??:??/??:??] install: ncctools [2430k]
running mktexlsr ...
done running mktexlsr.
tlmgr.pl: package log updated: C:/Applications/texlive/2019/texmf-var/web2c/tlmgr.log

No comments:

Post a Comment