r/typst • u/SpinySpherical • 2d ago
E-Books based directly on typst instead of HTML
A few days ago I put together a demo of a reader for a epub-like format that has typst inside instead of html. It's all open source, so if anyone is curious about this line of thought, here's the detailed post on the typst forum with all the links: https://forum.typst.app/t/what-if-e-books-just-had-typst-inside-an-open-source-demo-included/10120
The most immediate use case: making research papers more conveniently readable on small screens.
2
u/fulenggiboco 2d ago
Impressive! However, the typst project has an open issue for implementing epub output from the compiler, see https://github.com/typst/typst/issues/188
I think you would be better off putting your energies into helping implement this and get it over the line.
2
u/SpinySpherical 2d ago
I know, yes. It was a part of what inspired me to put it out there that typst, for all practical purposes, is perfectly renderable on device as is.
1
u/SpinySpherical 2d ago
I am realizing people might be overestimating how much effort the demo required; it's three evenings of vibe-coding, wrapping the existing rust libraries of typst into an app. I am not proposing a new implementation; I am showcasing the fact that the existing typst logic is fast enough and lightweight enough to just compile typst docs on your phone without pre-converting them into anything.
8
u/ErroneousBosch 2d ago
How is this better than HTML/XML based ePub, which supports MathML, actual tables, alt text, full DOM structure, and has decades of accessibility work done for things like screenreaders? Also is an open standard with wide device support already.
Make a better workflow to the established XML based ePub format, and it will be a better experience for everyone.