This question is closely related to Determining which TeX Live collection a package belongs to, and maybe remotely to What font packages are installed in TeX live?.
I am a bit confused about the organisation of TeX Live packages into "official" collections and about contents of some TeX Live packages. Also, the relation between "packages" that can be used with \usepackage
and "packages" in the sense of CTAN is not very clear to me. Moreover, I do not know if packages in CTAN correspond bijectively with packages of TeX Live. (I know however that OS-specific distributions of TeX Live have their own packages.)
-
I know that TeX Live packages are often organised into collections like
collection-latexrecommended
,collection-latexextra
,collection-science
. Does there exist an "official" partition of packages into collections? Can I brows it somewhere? I have found some listing here:- http://mirror.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb Is this a reliable source for TeX Live package organisation? Is there a better one?
-
Where can I see which
\usepackage
-type packages each CTAN package provides, and vice versa, which CTAN package provides a given\usepackage
-type package? For example, I am confused about the relation betweenlmodern
LaTeX package, which has an a bit obscure entry in CTAN andlm
CTAN package. For example, canlmodern
be available withoutlm
being installed? If yes, would Latin Modern font be installed in this case? Conversely, can I have a situation wherelm
is installed, but eitherlmodern
package or the actual Latin Modern font in unavailable?[^debugging_case]
[^debugging_case]: I am actually debugging a situation where lm
TeX Live package must have been installed in NixOS user profile, but Latin Modern font was not available in XeLaTeX in \setmainfont
without installing an OS-specific Latin Modern font package.
Best Answer
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.\usepackage{aaa}
This is used in LaTeX source code and references one particular.sty
file that will be loaded..sty
file, sometimes containing many of them and other files (fonts, metrics, data, ...).tlmgr
that is not calledcollection-*
orscheme-*
. These are usually the same as the CTAN packages, with very few exceptions.You asked what are the official places to check. That is not easy:
\usepackage
. The only way is to check the list of files available. In TeX Live you can do that withtlmgr search --file .sty
, which will give you a long list of CTAN/TeX Live package names and contained style files (BTW, currently 4509 files).tlpsrc
files in the subversion repository. However, this will not help you much, because there are no descriptions or files contained. You can again usetlmgr 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, buttlmgr
might be more comfortable to query this data.tlmgr info collections
To go through your example of
lm
versuslmodern.sty
, you could do the following.Use
tlmgr
to find which package provideslmodern.sty
:Then use
tlmgr info
to get more details: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 islm
("Contained in TEX Live as lm").