3 ms·
> In justified text, it divides into appropriate syllables a word that lands on a line break, a task that machines have not yet mastered Maybe I’m misunderstan
by phdelightful 4y ago
> In justified text, it divides into appropriate syllables a word that lands on a line break, a task that machines have not yet mastered
Maybe I’m misunderstanding but Latex does this pretty well (“mastered” is a bit fuzzy I guess).
- zamadatix 4y agoThe hyphenation dictionaries browsers use for CSS hyphenation seem to be pretty accurate as well. At least for English.
- jfk13 4y agoAll those I'm aware of are directly based on those used in the TeX world, so that's to be expected. What browsers are less good at, though, is determining exactly which lines to hyphenate when the possibility exists. If the 'hyphens: auto' property is used, they tend to be too eager, whereas (La)TeX applies hyphenation much more judiciously.
- kqr 4y agoIt goes way beyond dictionaries though. Once you know where you can break words, how do you know where you should break words? A simple flood fill will hyphenate very enthusiastically, use suboptimal breaking points, does not consider stretching whitespace, and leads to rivers and other artifacts. Many more sophisticated algorithms suffer from the same problems. Last I used LaTeX seriously, it also produced rivers where a human using e.g. Scribus would not.
- zestyping 4y agoI wonder if they're referring to cases where the hyphenation opportunities differ for words with different meaning but identical spelling. In some cases, the meaning (and hence the accenting, and hence the hyphenation) can only be derived from context, as with "present", which can be hyphenated "pre-sent" or "pres-ent".
- MikeDelta 4y agoI think that is thanks to the Knuth-Plass algorithm, with Knuth being the inventor of Tex, which powers Latex. The problem seems not trivial indeed. http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf http://www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf https://tex.stackexchange.com/questions/230668/any-progress-on-knuth-plass-algorithm https://tex.stackexchange.com/questions/230668/any-progress-... http://litherum.blogspot.com/2015/07/knuth-plass-line-breaking-algorithm.html http://litherum.blogspot.com/2015/07/knuth-plass-line-breaki...