You might also check out Pollen [0], a publishing system written in Racket. The creator of Pollen, Matthew Butterick, uses it to produce his own digital books—including the outstanding Practical Typography [1].
Edit: I see after a quick search that Pollen has already been featured on HN multiple times [2] [3], but I still think it might be helpful to reference it again here.
This is an interesting use of static site generators.
If you are interested in the (Markdown content -> publishable format) pipeline, take a look at Pandoc. Ultimately this is more developer-oriented however.
I've been looking to write an interactive book - think of Apple Books but in HTML and this tool seems to do the job, only thing is that I don't know any R.
I recently published a simple book using Markdown and Pandoc. It went OK but I think next time I'll try ASCIIDoc due to what I recall as "extra features which would have been nice."
I use markdown to pdf flow with pandoc+xelatex. Found a few tex code on stackexchange sites and current setting is good enough for me, made a blog post too [1]
There's also a latex template I've bookmarked [2] - I haven't tried yet, but sample on the repo looks nice
Example of a book I published with this approach: https://www.amazon.com/dp/0692553916 (a fairly challenging type setting problem with lots of footnotes, foreign language, etc.)
The main gotchas are that if you really want it to look good you have to dig into the Latex template, so ultimately it would take more effort to make it push-button for non-technical users.
I tried something similar to this the first time I heard of wkhtmltopdf some seven or eight years ago using css to emulate an A4 size box. (it was meant as a replacement for mssql reporting server)
First, 40 page reports experienced a few millimeters of sliding. It became more apparent at 60 pages.
One more "cons" can be hyphens, for a comfortable reading a book is normally justified text with hyphenation. Not sure if wkhtmltopdf will respect that
While I would love to see a decent Jekyll workflow to work with books, this is not it.
The output looks nice enough, but there aren't even links from the table of contents to the chapters. Neither in the HTML nor the PDF version. Nor does it say what page number to find the chapter on in the PDF.
Additionally, as mentioned in the "cons" section of the article, "Chapters are spit out as one long, single page." This includes the PDF, where there aren't even page breaks at the start of new chapters.
This is no way to publish a book. Even a simple one.
Does anybody have a Jekyll theme or workflow that actually works well with books?
I haven't touched the code in a couple of years, but I wrote something combining Jekyll, Pandoc, and custom LaTeX templates for publishing my wife's novels (ebook and print).
I have published two books so far using the most obscene of methods; I parse my own HTML into XeTeX using a mix of bash and Python.
Parsing HTML is supposedly a big no-no but what’s the problem when it’s your own code?
Anyway, it seems like most comment here are trying to reinvent the wheel when any variant of LaTeX is a great solution; there are never any compromises to be made with TeX.
[0] https://docs.racket-lang.org/pollen/ [1] https://practicaltypography.com
Edit: I see after a quick search that Pollen has already been featured on HN multiple times [2] [3], but I still think it might be helpful to reference it again here.
[2] https://news.ycombinator.com/item?id=20027116 [3] https://news.ycombinator.com/item?id=15335010