-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: Support alternate LaTeX engines #22715
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
Comments
|
Tectonic downloads
I do have now, but getting the generated tex file to compile wasn't trivial, due to |
But that seems an orthogonal issue to whether tectonic works? Personally I agree that it is a bit user-hostile for us to require on a non-standard package, but I'm not sure if that is on us, or on TexLive for not including it by default. I guess your point is that tectonic would have magically taken care of this for you, but that doesn't help our many non-tectonic users. |
That's part of the point but it's not accurate. Generating tex documents that with Tectonic will produce similar results to what's produced now, is simpler because it uses xetex, UTF-8 and modern OpenType fonts - meaning that generating such it won't even require the |
What about introducing another rcParam, like Possibly with a finite number of options ( But, yes, it can make sense to make the engine configurable in the light of potential benefits from fonts, UTF8 and xetex/lualatex. At the same time, there is for sure a risk for more issues popping up and more support required. Probably it can make sense to subclass |
We currently don't support xetex or pdftex (and therefore likely can't support tectonic either), due to #20262 (comment). It would be nice to fix that, but it's not a trivial piece of engineering either (as outlined in that comment). If someone wants to have a go at that, I could probably provide some very high-level mentoring (the first step would be to get familiar with the current implementation of dviread)... |
@doronbehar #29807 should help moving in that direction (by first supporting xetex itself), but from a quick look tectonic is more complicated to support because it does not record full font paths and (from what I've found...) may not expose an external API to query its internal font path database. Essentially, this is the issue described at tectonic-typesetting/tectonic#1019 (the "AFAIK .dvi files unfortunately only list the base name of the font files (e.g. font.otf and not /path/to/font.otf), so after Tectonic (or XeTeX) is done, dvisvgm has to look up the files again." part: actually xetex records full font paths so we're fine, only tectonic doesn't). If you're still interested in this, maybe you can try to get the issue fixed on tectonic's side? From a brief investigation: it appears that tectonic searches the file via io.input_open_name |
Problem
I don't use Texlive, I use Tectonic, and I using
plt.rcParams['text.usetex']
requires me to download a different LaTeX engine, not only because thelatex
binary is searched, but also because thetex
files that are meant for compilation are meant forpdflatex
, and notxetex
, which tectonic essentially wraps.Proposed solution
Add a new option to
rcParams
which will enable using a different LaTeX engine, and another option that will control whether the generatedtex
files should be intended for xetex orpdftex
.This seems not too complicated to solve, but I wish to know what do you think, and whether you'd be willing to add more moving parts to
TexManager
class, especially since the generated tex files for axetex
engine should be substantially different.The text was updated successfully, but these errors were encountered: