Live data from Hacker News

Laying Out a Print Book with CSS

iangmcdowell.com

71–80 of 121 posts

Re: Laying Out a Print Book with CSS

#71
post #70

> Affinity Publisher Didn't know Serif had made a third product. Be wary of them - Designer and Photo are both buggy minefields and their support forum is full of snobby jerks. Crashes have been reported and present for years, with little or no response from Serif. Their developers all seem either disgruntled or burnt out. Some of the employer review sites confirm this. They're cheap but you certainly get what you pa…

Never tried them but is it worse than adobe products?

Re: Laying Out a Print Book with CSS

#72
post #64

The author is actually underselling CSS for rendering PDF layouts. Of course, if you just do a static book, you are probably better off with software like InDesign. But if you need PDFs with dynamic and complex content (e.g. info documents with graphs, tables, dynamic text) then HTML/CSS is actually pretty great. As he mentions, unfortunately the CSS3 Paged Media spec is not very well-supported by major browsers, tho…

CSS definitely has some (a lot of?) benefits over LaTeX in terms of styling, but what I like about LaTeX is that, when you don't care about the specifics, it's insanely easy to get a good looking document. About half of this article is trying to finagle CSS into producing styling that LaTeX would produce automatically, by default.

Re: Laying Out a Print Book with CSS

#73
post #64

The author is actually underselling CSS for rendering PDF layouts. Of course, if you just do a static book, you are probably better off with software like InDesign. But if you need PDFs with dynamic and complex content (e.g. info documents with graphs, tables, dynamic text) then HTML/CSS is actually pretty great. As he mentions, unfortunately the CSS3 Paged Media spec is not very well-supported by major browsers, tho…

The problem with this: LaTeX (or actually TeX) typesetting is way better. It is hard to get all the spacing, kerning, hyphenation, etc., right so that the text looks good. There is no way a CSS-based solution comes close.

Moreover, one needs controls for:

- widows/orphans

- running paragraphs one or more line longer or shorter

- setting a page spread to be one (or possibly two) lines deeper or shallower

- adjusting the size/cropping of an image/figure/table so as to influence pagination

- adjusting the placement of an image/figure/table so as to influence pagination

In my decades of doing typesetting, I've had exactly _one_ chapter come out perfectly on import w/ no need to adjust _anything_ --- fastest 40 minutes of my life.

Re: Laying Out a Print Book with CSS

#74
post #70

> Affinity Publisher Didn't know Serif had made a third product. Be wary of them - Designer and Photo are both buggy minefields and their support forum is full of snobby jerks. Crashes have been reported and present for years, with little or no response from Serif. Their developers all seem either disgruntled or burnt out. Some of the employer review sites confirm this. They're cheap but you certainly get what you pa…

Never tried them but is it worse than adobe products?

Bug-wise yes, both Photo and Designer are very very buggy.

Functionality, also yes, but not by much. Only thing I miss from Photoshop in Affinity Photo is content aware tooling. I don't remember anything I miss from Illustrator in Affinity Design and I actually think they have better features than Illustrator (admittedly haven't used Illustrator in almost a decade so maybe they've caught up).

You really can't beat Affinity's price though unless you use GIMP/Inkscape of course, but I like neither of those programs.

Re: Laying Out a Print Book with CSS

#76
post #70

> Affinity Publisher Didn't know Serif had made a third product. Be wary of them - Designer and Photo are both buggy minefields and their support forum is full of snobby jerks. Crashes have been reported and present for years, with little or no response from Serif. Their developers all seem either disgruntled or burnt out. Some of the employer review sites confirm this. They're cheap but you certainly get what you pa…

Never tried them but is it worse than adobe products?

To chip in to on this, I've been using Affinity Photo for at least 5 years and I don't remember having many problems at all. That is to say, YMMV.

Re: Laying Out a Print Book with CSS

#77
post #65

This article completely misses the point. Proper typesetting is about achieving a consistent appearance starting from ligatures and kerning, then word spacing and hyphenation, up to entire paragraphs and pages. Each character has to be typeset considering what character came before, how many words are in the same line and other lines in the same paragraph. The choice of font is also questionable, but not the main iss…

> This example from the article says it all: https://iangmcdowell.com/blog/book_breaks.png What does it say? I read lots of book and... it looks like every other book. What am I missing?

So properly justifying text for a print layout is hard. For example on the right page, the sentence that starts with “Marcos wondered”.

You start to see how in the first line it’s fairly widely spaced but the second line starts to look like the line was crammed in to fit the line.

It’s subtle but those are the kinds of things that proper print layout tools help with. It’s weird looking at one page in a vacuum you won’t notice as much but after a few pages it starts getting “harder” to read. I’ve noticed this with some E-books and started to pick up on it.

Re: Laying Out a Print Book with CSS

#78
post #24

For those interested in this topic, you might want to checked paged.js https://pagedjs.org/documentation/ It's an polyfil for the unimplemented CSS paged specification, which is exactly that is needed for laying out pages. https://www.w3.org/TR/css-page-3/

If I wanted to write a book, how does this translate to the publisher's standards when it comes time to hand in the design? Do publishers accept css files? How does that whole publishing pipeline work with this css framework?

I thought the publisher gets a PDF.

Re: Laying Out a Print Book with CSS

#79
post #76

Earlier quoted context omitted.

Never tried them but is it worse than adobe products?

To chip in to on this, I've been using Affinity Photo for at least 5 years and I don't remember having many problems at all. That is to say, YMMV.

Yeah photo is leagues less buggy than designer. That said, I've had random crashes with Photo in the past too.

Re: Laying Out a Print Book with CSS

#80
post #64

The author is actually underselling CSS for rendering PDF layouts. Of course, if you just do a static book, you are probably better off with software like InDesign. But if you need PDFs with dynamic and complex content (e.g. info documents with graphs, tables, dynamic text) then HTML/CSS is actually pretty great. As he mentions, unfortunately the CSS3 Paged Media spec is not very well-supported by major browsers, tho…

The problem with this: LaTeX (or actually TeX) typesetting is way better. It is hard to get all the spacing, kerning, hyphenation, etc., right so that the text looks good. There is no way a CSS-based solution comes close.

TeX not only handles hyphenation, but also decides on where in a certain word it should hyphenate to optimize the current paragraph as a whole, balancing the hyphenation position in the word (some positions are better than others) against the aesthetics of the paragraph.
Post reply on HN