How to deal with missing packages

You’re giving Tectonic a try and it turns out that its base “bundle” of LaTeX files doesn’t include a certain package that you want to use. Or its version is too old. Or you have a custom package that isn’t part of TeXLive at all.

At the moment, Tectonic’s support for this sort of scenario isn’t as nice as we would like it to be. But, you have options. This thread lays them out.

Copy the package files into the directory containing your document

This is the simplest answer, in a certain sense. If a certain file is missing from Tectonic’s bundle, you can just put a copy of it next to your main document file. If the package you need involves multiple support files, it is generally fine to just put them all next to your input file in the same way. This starts getting messy at a certain point, but it’s a simple and effective solution in a lot of cases.

File an issue against the tectonic-staging repository

The default Tectonic “bundle” file is built using scripts that are maintained in the tectonic-staging Git repository. If there’s a package that you want to use that’s in TeXLive but not included in the default bundle, it may just be an oversight. If you file an issue we’ll look into it.

Create your own alternative bundle

This one is for advanced users only, and in fact is not really documented well enough to be feasible just yet. But in principle, there’s no reason that you can’t use the tools in tectonic-staging to create your own bundle file that contains whatever customizations you need. You can then make it available on the Internet or access it as a local file.

We intend to flesh out the infrastructure and documentation to make this a more practical option in the future.

Tell us why none of the above will work for you

If you don’t feel that any of the above options address your needs, we’d like to know why! Please let us know in this thread. Tectonic might not be the right tool for you right now, but we’d like to make sure that it can be at least as useful a tool for TeX users as any of the classic engines.

This was posted in 2017, have you added features since then?

I see two strategies to solve the problem of missing packages:

  1. Add a command that adds files to the local cache, something like tectonic add <pattern> that makes all files with this pattern available through the local cache. This can be useful in different situations:
  • If you have a package that is used by several of your projects, you don’t need to add it to all of them, you can simply do once tectonic add package_folder/*.
  • Or when you build a minimal docker container that will use tectonic --only-cached, you can fill the local cache with the standard and custom packages you need using tectonic add.
  1. Allow multiple sources. I see two situations in which this can be useful:
  • Provide an additional package that contains only the missing packages to the standard package, and serve it locally or by http. For example, in this way, a user community can provide the package “pscy” over http, as requested in Issue #108.
  • You can have a backup server (less powerful then the default one) in case the default server is down.