Re:Using Web Technologies to Print a Book
by quotemstr on Wednesday January 09, 2019 @10:36PM
(#18871310)
Do HTML and CSS rendering engines implement Knuth paragraph layout yet? AIUI, they still use greedy line layout and justification, which can produce various artifacts (like whitespace rivers and orphan lines) that the Knuth-style linebreaking in TeX avoids. Right now, I still don't think I'd consider using anything but TeX or some heavyweight DTP package for printed material.
[ Parent
| on HN ]
Re:Using Web Technologies to Print a Book
by sanxiyn on Wednesday January 09, 2019 @11:48PM
(#18871608)
As I understand, Prince XML, which is a CSS rendering engine, uses variant of Knuth-Plass line breaking. They have samples on homepage, so judge for yourself. It's most certainly not greedy.
No CSS implementation "for the web" does.
Implementing CSS justification for printing as Knuth-Plass and implementing so in a web-compatible manner is somewhat very different task. I think the algorithm's interaction with CSS floats is unclear. As always, it's in the Firefox's bug tracker, no, it's not because browser vendors don't want to or are lazy. https://bugzilla.mozilla.org/show_bug.cgi?id=630181
Re:Using Web Technologies to Print a Book
by trynewideas on Wednesday January 09, 2019 @11:50PM
(#18871618)
Apache FOP[1] does[2] if you're willing to jump back in time to XHTML or use an HTML2FO converter.
As always, Unicode is a problem.
1: https://xmlgraphics.apache.org/fop/
Re:Using Web Technologies to Print a Book
by sanxiyn on Wednesday January 09, 2019 @11:52PM
(#18871628)
That's Knuth-Liang hyphenation, which is something different from Knuth-Plass line breaking.
Re:Using Web Technologies to Print a Book
by trynewideas on Wednesday January 16, 2019 @08:35PM
(#18927547)
Oh, good catch, sorry about that.
Simon Pepping did some work done on Knuth-Plass in FO, but it's old and probably not quite as relevant now:
- https://web.archive.org/web/20070114211331/http://www.leverk...
- https://web.archive.org/web/20070128145517/http://www.leverk...