Feat: Added support for Tectonic tex compiler - #4977
Draft
christopher-hampson wants to merge 7 commits into
Draft
Conversation
christopher-hampson
marked this pull request as draft
August 31, 2026 13:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview: What does this pull request change?
Adds support for using Tectonic (https://tectonic-typesetting.github.io/) as an additional TeX compiler.
The main changes are:
TexCompilerandTexOutputFormatconstants (asStrEnums, which support backward compatibility for users to continue supplying kwargs asstr).tectonicas a compiler withTexCompiler.TECTONIC, supportingXDVandPDFoutput formats (based on the suggestion in Support tectonic tex engine #4042)tecto(https://pypi.org/project/tecto/) as an optional dependency which provides the wheels for Tectonic.Motivation and Explanation: Why and how do your changes improve the library?
Tectonic appears to have some quite nice features and, with
tecto, the installation appears to be simpler and more uniform.Removing some of the hard-coded strings should make it easier for users and their IDEs to identify available options for
tex_compilerandoutput format.Further Information and Comments
Closes Support tectonic tex engine #4042
There are some known issues with fraction lines when using pdf as the target output format; this does not seem to be unique to Tectonic but rather a common issue with all compilers compiling to pdf. The issue does not present when compiling to xdv (both for XeLaTeX and Tectonic) or dvi (for LaTeX, pdfLaTeX, and LuaLaTeX). This seems to be due to a difference in how
dvisvgmconverts the different formats intosvg, with thepdf->svgconversion representing the fraction line as apathwith non-zero stroke, whereasdvi/xdv->svgrepresents the fraction line as arect.This PR also removes
luatexfrom the advertised list of available compilers as this did not appear to be functional due to theTexTemplatebaking in LaTeX syntax with_BEGIN_DOCUMENTand_END_DOCUMENT. This is potentially a breaking-change, although I could not get this to work onmainwithout the above changes, but could be added toTexCompilerif there is some use-case for this that I am missing?Reviewer Checklist