The confusion here arises from a complete overload of the word package
, which can refer to many different things here. Let us try to distinguish most of these packages a bit more, beginning from the smallest unit.
- Style file:
\usepackage{aaa}
This is used in LaTeX source code and references one particular .sty
file that will be loaded.
- CTAN package: These are sets of files developed by the same person or group, sometimes containing only one
.sty
file, sometimes containing many of them and other files (fonts, metrics, data, ...).
- TeX Live package: This is what you can install in TeX Live with
tlmgr
that is not called collection-*
or scheme-*
. These are usually the same as the CTAN packages, with very few exceptions.
- TeX Live collections: These are groups of TeX Live packages / CTAN packages. The packages are roughly ordered by use and relevance.
- Distribution packages: Distributions (like Debian, RedHat, and SuSE) often repackage the TeX Live distribution into their own format and units. Debian creates one Debian package for each collection in TeX Live. Other distributions do it differently.
You asked what are the official places to check. That is not easy:
- Style files: There is no easy way, since there are too many of them, and many are not used directly with
\usepackage
. The only way is to check the list of files available. In TeX Live you can do that with tlmgr search --file .sty
, which will give you a long list of CTAN/TeX Live package names and contained style files (BTW, currently 4509 files).
- CTAN package: CTAN itself has extensive search and browsing options.
- TeX Live package: The authoritative source of packages in TeX Live is best found in the list of
tlpsrc
files in the subversion repository. However, this will not help you much, because there are no descriptions or files contained. You can again use tlmgr info
which will list all packages, including whether they are installed or not, and the short description. You also mentioned http://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb, which is definitely fine and readable, but tlmgr
might be more comfortable to query this data.
- TeX Live collections: see above, or use
tlmgr info collections
- Distribution packages: every distribution has its own info pages
To go through your example of lm
versus lmodern.sty
, you could do the following.
Use tlmgr
to find which package provides lmodern.sty
:
$ tlmgr search --file lmodern.sty
lm:
texmf-dist/tex/latex/lm/lmodern.sty
Then use tlmgr info
to get more details:
tlmgr info lm
package: lm
category: Package
shortdesc: Latin modern fonts in outline formats
longdesc: The Latin Modern family of fonts consists of 72 text fonts and 20 mathematics fonts, and is based on the Computer Modern fonts released into public domain by AMS (copyright (c) 1997 AMS). The lm font set contains a lot of additional characters, mainly accented ones, but not exclusively. There is one set of fonts, available both in Adobe Type 1 format (*.pfb) and in OpenType format (*.otf). There are five sets of TeX Font Metric files, corresponding to: Cork encoding (cork-*.tfm); QX encoding (qx- *.tfm); TeX'n'ANSI aka LY1 encoding (texnansi-*.tfm); T5 (Vietnamese) encoding (t5-*.tfm); and Text Companion for EC fonts aka TS1 (ts1-*.tfm).
installed: Yes
revision: 28119
sizes: src: 4817k, doc: 2629k, run: 42581k
relocatable: No
cat-version: 2.004
cat-date: 2015-08-03 05:43:12 +0200
cat-license: gfsl
cat-topics: font font-proportional font-mono font-type1 font-otf font-cm
collection: collection-fontsrecommended
If you want to see all files contained in lm
, just add --list
to the above invocation and it will give you all contained files.
Finally, you can also browse the lm
package by going to https://ctan.org/pkg/lm, where you can confirm that the respective TeX Live package name is lm
("Contained in TEX Live as lm").
texlive.tlb
is where TeX Live gets the information about packages from: for a local install you can read the version in your tree to see what 'your' TeX Live 'thinks'.