Is this possible with CSS? I'm trying to typeset a long text on the web and I'm not happy about how it looks compared to LaTeX and PDF. (it's straight out awful)
Is this possible with CSS? I'm trying to typeset a long text on the web and I'm not happy about how it looks compared to LaTeX and PDF. (it's straight out awful)
CSS Text 4 drafts might bring massive improvements for text handling and will give more fine grained controls over hyphenation, such as `hyphenate-limit-lines` (https://drafts.csswg.org/css-text-4/#hyphenate-line-limits), but obviously this is nothing that will make it to stable browsers in the near future. Still, the changes that might come for CSS with this draft would bring it a lot closer to LaTeX or InDesign.
https://bugs.chromium.org/p/chromium/issues/detail?id=605840
Especially considering LaTeX had this right for decades - and it is one of the major issues for good and pleasant readability... sigh.
> Linux and Windows don't have built-in dictionaries.
Every Linux distribution I've ever been on has had a dictionary. I'm not sure what package it's in, but the point is that packages exist, and can be depended on (or, although I dislike this, vendored in).
(Is it perhaps that they need a dictionary with the syllabic breakdown of the word? IDK if the normal dictionaries will give you that, or if it can be computed or heuristically determined?)
(Edit: e.g., on Ubuntu, the "text" category includes a number of dictionaries in various languages … http://packages.ubuntu.com/xenial/text/ )
Def on my Mac and CentOS boxes.
Package is words.noarch for the latter.
Browser inserted Soft-Hyphens could fix this, but since they are language dependent browser support is spotty: https://developer.mozilla.org/en/docs/Web/CSS/hyphens#Sugges...
By itself most browsers can break soft-hyphens pretty reliable, but they have to be generated first: See https://github.com/mnater/Hyphenator or https://github.com/bramstein/hypher
Yes, hyphenation is language-specific, but if your application is laying out blocks of text, a set of hyphenation tables is a basic part of language support.