Tectonic: a complete, modernized, self-contained TeX/LaTeX engine


I’d like to announce the release of version 0.1.5 of Tectonic, a complete, modernized, self-contained TeX/LaTeX engine. TeX is a language for precision typography of technical documents.


I’ve been working on this under the radar for a while, but I think it’s progressed far enough where it’s time to start advertising it a bit more widely.

Right now, Tectonic primarily delivers a command-line client that replaces standard TeX engines. Unlike other TeX engines, Tectonic:

  • Downloads resource files from the internet on-the-fly, preventing the need for a massive install tree of TeX files
  • Automatically and intelligently loops TeX and BibTeX to produce finished documents repeatably
  • Has a command-line program that is quiet and never stops to ask for input
  • Supports modern OpenType fonts and Unicode

It is delivered as a Rust crate that can be embedded in a variety of other contexts; the Rust API wraps ~120,000 lines of C/C++ code. Tectonic is derived from the XeTeX extension of the standard WEB2C TeX engines. The pre-built bundles of support files are from TeXLive and hosted by JFrog Bintray.

Current areas of work are:

  • Reducing the dependence on system libraries to make the code easier to install and more portable
  • Gradual refactoring of the backing code to not be such a mess (seriously, you don’t even want to know)
  • Adding support for modern HTML output

This last item is something I’ve been working towards for several years. When the pieces come together, I believe that Tectonic will be able to reproducibly typeset technical documents with best-in-the-world output to both PDF and web-browser formats. It will take some time to get there, though.

Here’s the GitHub repo:

Questions and contributions are welcome! I’d love to recruit folks who might be able to contribute to the project in any of a variety of ways. The GitHub issues page is the place to start.




Reddit link.


Thanks for posting!


A very cool project!

I was really waiting for a new modern implementation of (La)Tex.

But: it’s using XeTex, so calling it a complete and self contained engine is kind of misleading, imo.


It’s “using” XeTeX in the sense of embedding all of the code, so I think it’s fair to call it self-contained. It has no runtime dependencies besides system font and image libraries.


I was able to use it to successfully render one of my tex files to PDF. Neat.


Have you considered Flatpak for distribution? This would remove the dependency on Python, and a few install steps.


@G2P No I hadn’t … I guess I don’t have a great sense of what the uptake of Flatpak has been like. In general, I’m having trouble deciding what distribution method(s) to favor, since there are so many options and I only have so much time. Even anecdotal evidence about which methods give the most bang for the buck (from you or anyone) would be very helpful!


Would really appreciate a simpler way to install. cargo install fails on some dependency. Would it be feasible to host prebuilt binaries for some common arch/os on Github releases?

Or better instructions for how to install the dependencies on various systems.


@ramn Yeah, still trying to figure out what to do here — I’ve gotten some interesting suggestions, though. Please see the GitHub issue, and, in case you haven’t seen them, the developer notes which include some build instructions for those who can’t or won’t use the Anaconda method.


Yes I followed those build instructions, on macOS, failed on missing icu-uc.


@pkgw Nice. Thanks for all the work on that. I just quickly installed it and tried it on an example file from here:

wget http://physics.clarku.edu/sip/tutorials/TeX/downloadfiles.zip

Worked perfectly :wink:


Very interesting project.

One of my biggest complaints about LaTeX (I’m using LuaTeX) is how errors are handled. Very often it’s impossible to track down the exact line that caused an error and error messages are meaningless. I understand it’s because TeX is a command processor and many (most?) syntax constructions used in LaTeX are implemented by packages, but anyway, is tectonic better in that regard?


I would say that the answer is: currently, it’s somewhat better; in the future, I hope it will be much better.

For instance, Tectonic automatically turns on the file-line-error option that some TeX engines have to actually report where errors came from. That’s nice. We also have the engine give up on the first serious error, which IMO usually leads to a better UX. And TeX’s chatter is hidden by default, so that it’s easier to locate the messages for certain errors. (For others, the error message is mixed in with the chatter so we have to show it all.)

And overall, Tectonic is happy to change the UX of the command-line engine to make it more human-friendly, so the goal is to improve its behavior in all of these regards relative to the previous engines. Better messages, more traceability, etc.