February 12, 2026

Live Preview: Compiling LaTeX Inside the Browser

Why we moved a LaTeX engine into the browser instead of making our servers faster, what it costs, and where it still falls short of a full TeX Live install.

Ask a researcher what they dislike about LaTeX and you will rarely hear "the syntax." You hear about the loop. Write a paragraph, hit compile, wait, look at the PDF, notice the figure has floated onto the next page, adjust, compile again, wait again.

The syntax is learnable in an afternoon. The loop is forever.

The cost is not the seconds

Treating compile time as a performance number is tempting. Cut it from eight seconds to four and you have doubled something. That framing misses what the wait actually does to you.

There is a rough threshold, somewhere near ten seconds, past which people stop waiting and start doing something else. They switch tabs. They check email. The expensive part is not the ten seconds. It is rebuilding your context afterwards, when you come back and spend a minute remembering which sentence you were in and what you meant by it.

So an eight second compile does not cost eight seconds. It costs eight seconds plus the paragraph you were about to write and then didn't.

There is a second cost that gets less attention. When feedback is slow, you batch your changes. You fix six things and then look, instead of fixing one thing and looking. When the output comes back wrong, you no longer know which of the six broke it. Slow feedback does not only waste time. It makes debugging harder, and LaTeX is a language where debugging is most of the work.

Why the server round trip has a floor

Almost every collaborative LaTeX editor compiles remotely. You press a button, your project is packaged and sent over the network, a container starts, pdflatex runs (often two or three times, to resolve references and citations), the PDF comes back, and your viewer redraws.

Very little of that is LaTeX being slow. It is queueing, container startup, and moving files across a network.

On a free tier there is contention on top: your job waits behind other people's jobs. That is why the same document compiles in three seconds one afternoon and twenty the next. The variance is not in your document. It is in the queue.

Faster servers help. They do not remove the round trip.

Moving the engine to where the writing happens

TeXposit's Live Preview runs a real LaTeX engine, compiled to WebAssembly, inside your browser on your own machine.

Everything else follows from deleting the network hop. There is no queue, so your document is not competing with anyone else's, and performance does not degrade at 4pm on a submission deadline. There is nothing to upload, because the source is already in the browser. There is no cold start, because the engine loads once and stays warm.

Compiles being cheap is what makes them continuous. They happen as you type rather than when you ask.

That in turn forces a design decision we think matters more than it sounds: the previous render stays on screen while the next one builds. A preview that flashes empty on every keystroke is worse than no preview, because you learn to stop looking at it.

For heavier documents there is a faster mode that renders an approximate layout, for when you are working on structure and prose rather than final typesetting.

Where this approach loses

Client side compilation is not universally better and it would be dishonest to sell it that way.

A browser engine ships a subset of TeX Live, not the full four gigabyte distribution. Documents that lean on unusual packages, custom fonts, or an exotic toolchain will hit gaps. A three hundred page thesis with heavy graphics compiles faster on a well provisioned server than on a mid range laptop. And the PDF you actually submit should come from the complete toolchain, which is why TeXposit keeps both: Live Preview for the writing loop, a full TeX Live install for the artifact you hand in. When the two disagree, the server is right.

The useful mental model is not that client side replaces server side. It is that drafting and producing are different jobs with different requirements, and forcing both down the same slow path was always a compromise.

The part that is hard to convey

Faster compilation sounds like a quality of life improvement. Pleasant, incremental, not very interesting.

In practice it changes what you do.

When looking is expensive, you avoid looking. You write long stretches blind and hope. When looking is free, the preview becomes something continuously true rather than a step you take, closer to how you treat a spell checker. You catch the overfull box while you still remember what you were trying to say. You try three versions of a table instead of keeping the first one that compiled.

That is not the same workflow running faster. It is a different workflow.


Live Preview is available now and works on the free tier. The Live Preview guide covers turning it on and when to fall back to server compilation.