Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-configurable search path(s) for .sty files, etc. ("-Z searchpath=..."?) #755

Closed
jason5122 opened this issue Mar 3, 2021 · 3 comments · Fixed by #814
Closed

User-configurable search path(s) for .sty files, etc. ("-Z searchpath=..."?) #755

jason5122 opened this issue Mar 3, 2021 · 3 comments · Fixed by #814

Comments

@jason5122
Copy link

jason5122 commented Mar 3, 2021

Hi, is there a recommended way to get Tectonic to locate my own .sty files when building (i.e., environment variable, flag, etc.)? My use case is with a "homework.sty" file that I'll be reusing in several documents in different locations, so copying the .sty multiple times doesn't seem like a great solution. Thanks for reading!

@aterenin
Copy link

aterenin commented Mar 5, 2021

Exact same situation. In TeX, the canonical way to do this is with TEXINPUTS and BIBINPUTS, which Tectonic does not currently seem to recognize.

Google and issue #108 seems to indicate this is currently unsupported, and I believe it is the single most important feature one could add for my use case. I'd love to switch to the package to avoid manually managing TeX Live - if this is an easy fix, happy to try to make a PR to add it.

@aterenin
Copy link

aterenin commented Mar 5, 2021

Looking a bit further, it seems the reason TEXINPUTS and BIBINPUTS are not currently supported is to maximize compilation reproducibility. This is a wonderful and worthy goal.

Therefore, following the discussion in #475, I propose to instead enable a command line argument marked "experimental" or "unstable" to discourage widespread use that either enables these variables to be read from the environment, or allows the user to pass them in as an additional command line argument. That way, users that need this have the capacity to make their setup work while not introducing needless barriers to reproducibility for everyone else. This solution would also handle #108.

@pkgw
Copy link
Collaborator

pkgw commented Apr 20, 2021

Yikes, it's taken me a while to reply to this straightforward inquiry. Sorry for that.

I'm biased, but I've gotten quite used to just copying around style files along the lines of your homework.sty. I keep some files in a Git repository and copy them out as needed.

If you're tracking your document source in Git, you could use Git submodules to automate the process a little bit more thoroughly.

As noted by @aterenin, I've been reluctant to add support for variables like TEXINPUTS directly because of its implications for reproducibility. I agree that some kind of unstable option like -Z searchpath=... would be a good compromise. Unlike the environment variable, it makes the customized build environment explicit with every run of the program. Now that the framework of #475 is in place, I think that adding such an option ought not require very much code.

I'm going to re-title this issue to make it more clearly refer to this particular aspect of things.

@pkgw pkgw changed the title How to use/install my own .sty files? User-configurable search path(s) for .sty files, etc. ("-Z searchpath=..."?) Apr 20, 2021
@pkgw pkgw closed this as completed in #814 Sep 10, 2021
@Neved4 Neved4 mentioned this issue Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants