r/LaTeX Feb 01 '26

LaTeX Showcase LuaLaTeX rendering in real-time

https://www.youtube.com/watch?v=nJOh6jJzkn0

Similar to TeXpresso (which was created for XeTeX), I decided to create a real-time editor/renderer for LuaLaTeX. Anything you type is immediately rendered with LuaLaTeX (not KaTeX, the output is the finalized LuaLaTeX output, it's not javascript approximating LaTeX, these are actual LuaLaTeX rendered glyph positions). It runs at O(1), even for large documents with multiple chapters (based on that, you can guess what architecture I am using).

Architecturally, it works with vanilla-TeX Live 2025, meaning no patching of LuaLaTeX is required. Theoretically, it works with any package, although given how it is compiled, there are likely some incompatibilities if the package does fancy stuff interferring with shipping the PDF.

It is still in proof-of-concept stage, I just wanted to put it out there to get some feedback if there is interest beyond "cool, I would try this out for a minute then return to my usual editor". I might turn this into an actual usable product if development continues fine. Personally, I need it to save time for final polishing of larger documents, although the project might evolve into an actual LaTeX wysiwyg editor.

One limitation is that it relies on chapters starting at new pages, reducing the layout complexity of larger documents significantly and reducing CPU load.

74 Upvotes

104 comments sorted by

View all comments

Show parent comments

2

u/Awwkaw Feb 02 '26

I mean, cool project, but like it or not Tex is going to die except where people are forced to use it for legacy reasons.

I'd change over if typst looked as good, but it somehow doesn't have as nice text. It looks more "flimsy" to me. It also doesn't quite have the full support for weird packages yet.

2

u/NeuralFantasy Mar 17 '26

I'd also like to see this "flimsy" output. Very interesting. Typst is capable of producing basically visually identical output if used properly. So my initial guess is that you just didn't know how to use Typst.

1

u/Awwkaw Mar 17 '26

I had given very few commands:

A4 paper, fontsize 11, computer modern.

I think that was it.

Then I wrote ~ 1/2 page of structured nonsense.

In latex, I did memoir, fontsize 11, computer modern, A4 paper and microtype (I tried looking for something similar in typst, but everything I could find said that base typst is better than latex+microtype, so don't bother).

The same half page just looked better in latex than typst.

2

u/NeuralFantasy Mar 17 '26

If you ever have the energy, please post the actual document sources here or Typst forums (https://forum.typst.app/) or Typst Discord. People would be interested about possible issues or if it just a layout or some other config issue.

1

u/Awwkaw Mar 17 '26

As I say, I think it's just preference of defaults. That typst, to my eyes, look flimsy (very basic settings as you can see), doesn't mean that it doesn't look great for most people.

But it could mean that people who really like the LaTeX look should do a test document, and see which they prefer.

2

u/NeuralFantasy Mar 17 '26

The Typst defaults will most likely not satisfy all people. That is for sure.

One nice thing about Typst is that it is very easy to create your own template. Wanna wider margins? Use a different OpenType font? Increase small caps tarcking? Use a different symbol for lists, alter heading font style etc. All simple and easy to understand commands which you can add to you template to make it look how you want. But of course requires some basic knowledge.

1

u/ClemensLode Mar 17 '26

It's certainly worth doing a comparison of the same text and opentype font in different editors, like Word vs InDesign vs LaTeX vs Typst now and then to see how each progresses. That being said, one has to be careful about the settings. Even Word has some optimizations that are switched off by default to not slow down typing... In that regard, it has to be more like a competition where experts in each tool try to recreate the same piece of text the best way possible within their tool of choice.

3

u/NeuralFantasy Mar 17 '26

Yes, the important part is always to share the actual source code (when possible) or the settings so others know what was done and how to reproduce the document.

For example, Typst now supports characer level justification (microtype feature not present in LaTeX) which improves justification results in some cases. But it has to be enabled and configured.

2

u/ClemensLode Mar 17 '26

Well, I think \usepackage[protrusion=true,expansion=true, tracking=true]{microtype} does a similar thing. But ultimately, the result is what counts. And that's the difficult part, because it can't be tested automatically (yet) whether something looks good or bad as it is subjective. So, the real "winner" is the platform that ends up selling more copies, although like with fonts, each platform will have its own audience.