3 ms·
> The splitting algorithm in CSS is worse than the one in TeX, because it has to work in real time and because (good) splitting patterns are often missing. Sur
by Karellen 4y ago
> The splitting algorithm in CSS is worse than the one in TeX, because it has to work in real time and because (good) splitting patterns are often missing.
Surely that's only the case for real-time renderers like web browsers.
If you're creating a layout engine for printed media that uses CSS as the way for authors/setters to specify style, couldn't it implement a better, slower splitting algorithm? Using an internal (or pluggable?) dictionary of hyphenations?
- eat_veggies 4y agoYou could probably write some JS to reimplement the better algorithm and insert the ­ hyphenation hints
- winety 4y agoYou could and that's basically what TeX does, just without the CSS. There are even typesetting systems similar to (La)TeX, that can take XML as input, see Context [1] or Sile [2]. They’re just a step away from using HTML + CSS. Why isn’t there such system? I do not know. [1]: https://wiki.contextgarden.net/XML https://wiki.contextgarden.net/XML [2]: https://sile-typesetter.org/ https://sile-typesetter.org/