Show HN: Gutenberg – Modern CSS framework to print the web correctly
github.com
github.com
page-break-before:
page-break-after:
Did not know these were in CSS3 !It's always worth poking around in others peoples code...
Printing can be quite a faf from web pages.
*Maybe publishers that don't want to be locked in with a single formatting tool (indesign)
The software itself is free to try at http://fivefilters.org/pdf-newspaper/
It uses the same formatting for all articles and adds columns. It's not a CSS framework like Gutenberg, the one posted here, which is intended for publishers to make their own content more printer friendly. PDF Newspaper tries to extract the relevant article content from any given page and then apply its own standard formatting on that and make it printable with our own printer stylesheet.
Once I tried to convert a paper in ACM style into HTML [0]. It seems to work today. A few years ago, Chrome broke columns in printing mode.
What I still cannot do is the copyright notice, which for ACM style must be at the bottom of the first column (see example [1]). This would require something like absolute positioning relative to a printed page.
[0] http://pp.ipd.kit.edu/~zwinkau/acm_html/test.html [1] http://pp.ipd.kit.edu/uploads/publikationen/buchwald10cases....
And yes, Chrome had removed multi-column printing. It's supported again now. There's a bug report last updated in March 2016: https://bugs.chromium.org/p/chromium/issues/detail?id=99358
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.
It might be useful to do some heuristics and see if a page has a good "print layout" and activate that for a reader mode in the browser via a plugin.
https://www.smashingmagazine.com/2015/01/designing-for-print...
Since the submitted appears to be the author, can we have "Show HN" added to the title?