3 ms·
If you're bothered by rivers and lack of hyphenation, check out a project I worked on a while ago, which implements the Knuth and Plass line breaking algorithm
by bramstein 16y ago
If you're bothered by rivers and lack of hyphenation, check out a project I worked on a while ago, which implements the Knuth and Plass line breaking algorithm in JavaScript. Combined with Hyphenator.js, the results are nearly indistinguishable from TeX output.
http://www.bramstein.com/projects/typeset/flatland/ http://www.bramstein.com/projects/typeset/flatland/
Earlier incarnations made it to HN before, but unlike the old version this renders in plain HTML instead of Canvas, so text can be selected, copied, etc.
- thebooktocome 16y agoI cannot upvote you enough. I wonder if I can hack this onto my wordpress blog.
- bramstein 16y agoYou probably could get it working, but the implementation isn't (yet) capable of dealing with arbitrary HTML. It only expects paragraphs and images. This is only a matter of implementation though, the core algorithm should be able to deal with most of the content found on websites. I'm talking to Filipe Fortes of Treesaver about implementing it as part of his Treesaver technology (demo: http://treesaver.publicintegrity.org/smoke_screen http://treesaver.publicintegrity.org/smoke_screen) Perhaps a general implementation will roll out of that.
- apl 16y agoWhy is this not widely known? Amazing stuff.
- kanru 16y agoThis plus the typeset library, I do wonder when will we have an online/ebook of TAOCP?