3

I often am confused about how to find the package name for use within the \usepackage{...} when looking at documentation. Where is this located?

Thanks

4
  • 3
    Usually, the package name is the first word in the title of the CTAN page, what does seem to be wrong, here? Can you link the CTAN webpage you're struggling with?
    – SebGlav
    Jan 6, 2022 at 13:16
  • 1
    As others have said, usually the CTAN package name matches the .sty file name. There are several exceptions, so if that doesn't work, try looking at the documentation, or browse the TDS archive looking for .sty files, or look for examples online, or . There is no one-rule-fits-all solution Jan 6, 2022 at 13:38
  • \usepackage reads a single .sty file, even if there are several in one directory. The autoload feature of MikTeX will work even if the folder name is different. Downloading into admin or loading the documentation requires the correct folder name. Jan 6, 2022 at 14:35
  • ... normally the documentation should have usage example...? Otherwise yes, search for ProvidePackage is an option but that's about as bad as reading the source code.
    – user202729
    Jan 7, 2022 at 0:17

2 Answers 2

7
  • Interesting question! First I thought that the question was silly but after thinking about it for some minutes, I changed my mind :).
  • Here is a "brute force" approach that I usually use in cases where it is unclear.

  1. Take https://ctan.org/pkg/oberdiek, for example (thanks to Phelype Oleinik for the example). enter image description here
  2. Here, we choose the bmpsize package (https://ctan.org/pkg/bmpsize). Then we open the Package Documentation. enter image description here
  3. Now, you can search for both, ProvidesPackage and usepackage. I strongly recommend using Adobe Reader (or similar) since the search does not always work as expected when I use the built-in PDF viewer of my browser (Chrome). enter image description here

This should give you a good starting point.

0

It will simply be the package name as listed on CTAN. For any options, these should be listed in the package documentation PDF file.

2

You must log in to answer this question.

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