Another use case for being able to layer extra packages on top of the bundle

#1

I thought GitHub issue #108 presented an interesting use case:

There is a package for LaTeX that is quite popular among users in Russia and eastern Europe — pscyr. It contains a number of fonts used by publishers in USSR, for instance, Literaturnaya. Some of these fonts were digitized and edited during 90s and their source and license status is unclear. Because of that, pscyr package is not included in any distribution.

For Texlive, installation includes copying files from archive to texmf directory and running mktexlsr && updmap-sys. Could it be possible to integrate an “external” package into tectonic?

As I replied in the issue, for the same reason that the distributions won’t include the package, I don’t think Tectonic can distribute it either. So if you really need to use the pscyr package, the best we can say is that you should unpack all of its files in the same directory as your input file. That’s clearly lame.

I’m having trouble thinking of how I want to approach these sorts of cases, but it’s becoming clearer that we need some kind of solution. We could download TeXLive packages, but I don’t believe that TeXLive archives old versions of packages, which would be essential to reproducibility.

#2

This sounds like it would be useful for my use case too.

I write classes that I don’t intend to share either because they only solve a very specialised problem that I have or because they are used for my employer or a client and sharing them makes no sense. I write these classes in order to abstract the type of document I’m writing in order to keep my tex source very clean and declarative. My classes are single class files with some resources used by the class file such as images.

At the moment I place the class and the resources in my working directory with my document source (and its resources).

It would be really nice to be able to “package” classes/resources up some how and have them exposed to Tectonic.

Thinking about this a little (and not being familiar with how things actually work) I thought that the following might work:

  1. given a directory of stuff separately create a bundle from that stuff in the expected bundle format
  2. permit the -b option to overlay. That is, search first provided -b bundle for resource and if not found, search the second -b bundle, etc, and if not found go to the main bundle repository.

Alternatively, make it easy to create custom bundles where the user can add their own classes/resources to some distribution, create a bundle, and then provide that customized bundle to Tectonic. (This would also permit Tectonic to operate offline).

Alternatively, (and remember I don’t know how Tectonic does this magic), allow Tectonic to look for resources in a path specified by the environment or a directory provided by a command line option.

PS. Tectonic is awesome. Thank you.

#3

LaTeX seems to recognize TEXINPUTS variable.

Using environment variable might be useful for Nix, where the packages are not installed into FHS but each package has its own root in /nix/store.

#4

Sorry for being dumb, but does tectonic use TEXINPUTS? I’ve tried this and it doesn’t work for me.

#5

I do not think so. I was only posting it for comparison.

1 Like
#6

That’s correct. I really want to avoid using environment variables for this sort of configuration, because they add a very non-obvious form of state-dependence to the program’s operation: the same command line might produce very different results depending on the value of the variable, and you generally don’t get informed about the variable’s value unless you explicitly know to check it.