14

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.)

  1. 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:

  2. 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 between lmodern LaTeX package, which has an a bit obscure entry in CTAN and lm CTAN package. For example, can lmodern be available without lm being installed? If yes, would Latin Modern font be installed in this case? Conversely, can I have a situation where lm is installed, but either lmodern 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.

1
  • 1
    Not a full answer, but 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'.
    – Joseph Wright
    Mar 4, 2017 at 14:40

2 Answers 2

18

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 ("Con­tained in TEX Live as lm").

7

tlmgr tool has most of the information that you need, for example if you query it for lmodern then

$ tlmgr list  lmodern
tlmgr: package repository http://anorien.csc.warwick.ac.uk/mirrors/CTAN/systems/texlive/tlnet (verified)
tlmgr: cannot find package lmodern, searching for other matches:

Packages containing `lmodern' in their title/description:
fixcmex - Fully scalable version of Computer Modern Math Extension font

Packages containing files matching `lmodern':
lm:
        texmf-dist/tex/latex/lm/lmodern.sty

So in texlive lmodern.sty is just in the lm package. The ctan entry for lmodern seems particularly strange being a historical note of discussions rather than relating to any real download. It could probably renamed.

8
  • Thanks for the information about lmodern. Otherwise, I would like to have a simple document of web page to see this information. I do not even have tlmgr on NixOS, for example, and it would be mostly useless there.
    – Alexey
    Mar 4, 2017 at 13:25
  • @gernot not necessarily, some linux distributions package texlive without tlmgr so that you use the system package manager apt-get or yum or whatever Mar 4, 2017 at 13:29
  • @DavidCarlisle Right ...
    – gernot
    Mar 4, 2017 at 13:30
  • @Alexey there are thousands of packages I'm not sure what a simple document with information about all of them could look like. Also if you are using a linux distribution repackaging, then the answer of which latex package is in which package for the system package manager is specific to that distribution, not anything the upstream texlive can document Mar 4, 2017 at 13:31
  • For the record, even on Ubuntu tlmgr was installed but didn't work (possibly it could be made to work on Ubuntu with some nontrivial system configuration).
    – Alexey
    Mar 4, 2017 at 13:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.