This doesn't work for Linux, but for folks writing a novel, I can definitely recommend Scrivener (Mac and Windows). In addition to a powerful writing environment, it's "Compile" feature can output flexibly for print and ebooks. I generated hardcover, paperback, mobi, and epub, with enough customizability for me and no scripting required. Granted this is Hacker News and people here _like_ writing code (myself included…
I've not used it in years but I know there was a Linux version available for download from the support forums. It had a few issues but it worked really well when I tried it ~2 years ago on Ubuntu 14.04
Using Web Technologies to Print a Book
31–40 of 69 posts
Re: Using Web Technologies to Print a Book
#32Re: Using Web Technologies to Print a Book
#33Earlier quoted context omitted.
WeasyPrint looks to have progressed a lot since last I looked at it (when there was no way I could use it at all, though I can’t remember the reason), but looks to still be quite limited. A couple of things that spring to my attention immediately: no flexbox, and no CSSOM (so that you can’t adjust the document based on layout at all unless you can do it in straight CSS). Still, in practice probably usable for what I…
One of the problem with CSSOM and similar things is the problem of iterative layout: Let's say you have a list which should be split automatically on two pages. You also want to add a table header on the second page. But now the second part of the list doesn't fit on the page anymore. So you need to split the list further, and add another header. Basically every change to the CSS or DOM requires a reflow (or clever o…
The basic idea is to add (placeholder name) stopUpdating/resumeUpdating to window, which can be polyfilled as no-op. The semantics is that CSSOM view methods are allowed to return the value when update was not stopped, or any later value. That is, current web standard forces you to do things "live". New methods give option to do things in batch.
Re: Using Web Technologies to Print a Book
#34I thought Markdown supports line breaks with two trailing spaces at the end of the line. This gist[0] also mentions or \ at end of line also working. [0] https://gist.github.com/shaunlebron/746476e6e7a4d698b373
>Why does markdown do this? If I want two lines to run consecutively I won’t introduce a newline.
Re: Using Web Technologies to Print a Book
#35I clearly missed something, but why are you not going markdown -> PDF directly? That's what we use extensively in our operations playbooks at work and it gives something that looks like I'd get in a book - even more so after I tweaked the templates a little.
That is, you probably want to design PDF output. Some users prefer to do any design work whatsoever using web technology. Therefore, PDF needs to be generated from HTML.
Re: Using Web Technologies to Print a Book
#36Last time I checked (maybe 2 years ago?) there wasn't a good open source html to pdf workflow. Specifically page-numbers and anything else involved with paged media is a nightmare, the CSS standards in that regard are not implemented. There is "Prince", but it isn't OSS and rather expensive. Phantomjs (and its ilk) are based on browser engines and just don't support this. Also I would love to be able to change layout…
Re: Using Web Technologies to Print a Book
#37Re: Using Web Technologies to Print a Book
#38Earlier quoted context omitted.
One of the problem with CSSOM and similar things is the problem of iterative layout: Let's say you have a list which should be split automatically on two pages. You also want to add a table header on the second page. But now the second part of the list doesn't fit on the page anymore. So you need to split the list further, and add another header. Basically every change to the CSS or DOM requires a reflow (or clever o…
I have a theory how this should be solved in web standard, which in turn has other uses besides printing, but well, I don't feel like I can affect web standard in any meaningful sense. The basic idea is to add (placeholder name) stopUpdating/resumeUpdating to window, which can be polyfilled as no-op. The semantics is that CSSOM view methods are allowed to return the value when update was not stopped, or any later val…
In any case, html/css for paged media should be mostly separate from website code. "Printing out" web pages works in many cases, but it's crappy.
Re: Using Web Technologies to Print a Book
#39Re: Using Web Technologies to Print a Book
#40I clearly missed something, but why are you not going markdown -> PDF directly? That's what we use extensively in our operations playbooks at work and it gives something that looks like I'd get in a book - even more so after I tweaked the templates a little.
Because the user in question does not know and is unwilling to learn how to design anything if it is not web technology. That is, you probably want to design PDF output. Some users prefer to do any design work whatsoever using web technology. Therefore, PDF needs to be generated from HTML.
I'd probably use Asciidoctor which gives more flexibility on the markup side already, but if this process works for them, why not use it.