zed-Latex

12.3.2025

In the past year, I found myself loving the new Zed code editor for its speed and modern design, but one thing was missing: good LaTeX support. As a developer who frequently writes documents in LaTeX, I wanted the convenience of editing .tex files in Zed with live PDF output – just like I had in other editors. That itch led to the creation of zed-latex, a LaTeX extension for Zed that tightly integrates with your local LaTeX toolchain.

Zed-latex was built to bring a smooth LaTeX workflow into Zed, complete with automatic PDF builds and an in-editor preview. The response from the community has been incredible – the extension has quickly gained over 85,000 downloads. Zed-latex is open-source on GitHub, and in this post I’ll share what it does and how it works.

Integration with Your Local LaTeX Toolchain

One of the core design goals of zed-latex is seamless integration with your existing LaTeX setup. Instead of reinventing the wheel, the extension hooks into your local LaTeX installation. That means if you already have a TeX distribution (like TeX Live or MikTeX) on your system, zed-latex will leverage it for compiling documents.

When you compile a file named main.tex, zed-latex essentially invokes the same command you would run in a terminal:

pdflatex main.tex
sh
Copy

This approach keeps things simple and transparent. You’re not relying on any cloud service or proprietary engine – it’s using tried-and-true LaTeX tools right on your machine.

Advanced users can also configure it to use latexmk or other compilers if needed.

Automatic PDF Build on Save

Another killer feature of zed-latex is automatic PDF building whenever you save a .tex file.

With zed-latex, the moment you hit Cmd+S/Ctrl+S to save your LaTeX document, the extension kicks off a background build. You don’t have to manually run pdflatex every time – just write and save.

Here’s a simplified pseudo-code of how this process works:

editor.onSave(file => {
    if (file.extension === ".tex") {
        run("pdflatex", [ file.path ]);
        openPdfPreview(file.path.replace(".tex", ".pdf"));
    }
});
js
Copy

This tight feedback loop means you can catch errors or see formatting changes immediately after saving.

If you prefer manual building for large documents, auto-build can also be toggled off via settings.

Live PDF Preview in the Editor

Of course, compiling to PDF wouldn’t be as useful if you couldn’t see the result immediately. Zed-latex addresses this by opening a live PDF preview inside the editor.

The first time you save and a PDF is generated, the extension will open it in a preview pane. From then on, each time you save, the preview refreshes to show the latest version.

This preview pane is even sync’d to your editing position (thanks to SyncTeX support), so if you’re working on page 5 in your source, you’ll see page 5 in the output after saving.

A small technical detail: after compiling successfully, the extension simply opens the output file in Zed:

editor.open("mydocument.pdf");
js
Copy

Zed’s built-in capabilities handle the PDF rendering, giving you a real-time experience similar to a full LaTeX IDE.

Conclusion

In building zed-latex, my goal was to make LaTeX editing in Zed as comfortable as in any dedicated LaTeX editor, combining the power of the local LaTeX toolchain with Zed’s modern UX.

Today, with features like auto-compile on save and a live preview pane, writing LaTeX in Zed feels frictionless and efficient.

If you’re a developer or tech professional who works with LaTeX documents, I encourage you to give zed-latex a try.

You can install it via Zed’s Extensions panel (just search for “LaTeX”) or check out the zed-latex GitHub repo for the source code, issues, and documentation.

Whether you’re typesetting a math-heavy report, preparing slides or writing a paper, zed-latex aims to streamline your workflow so you can concentrate on the content.