News for hackers. Stuff that matters.
Re:The Web Book Boilerplate - Writing books for almost every... by jamesbritt on Wednesday January 02, 2013 @02:47PM (#4998786)
I'm working on a set of self-published E-books (http://justthebestparts.com).

Among my goals was to be able to publish to the Web while writing and have the option for public comments. I also wanted to write the books using Markdown or Textile.

I ended up writing some tools to convert the generated (X)HTML to epub and mobi, and the results are pretty good. However, I also want to have a PDF version and I've yet to find an automated tool that does a good job. I'm deeply skeptical that any tool can take HTML and output nicely formated PDF with proper page breaks, image handling, no dangling sentences or paragraphs, no distracting rivers of white-space in the text, etc.

I'll give this a shot but I'm not sure if there's a better solution than periodically hand-crafting the PDF.

Re:The Web Book Boilerplate - Writing books for almost every... by martininmelb on Wednesday January 02, 2013 @04:11PM (#4999329)
If you're interested in creating a PDF from Markdown, I would suggest that you look at Pandoc (used by wbb). It generates LaTeX from the Markdown and generates a PDF from the LaTeX. I've yet to play with it to see if LaTeX metacommands can be placed in the Markdown.
Re:The Web Book Boilerplate - Writing books for almost every... by anonymouz on Wednesday January 02, 2013 @04:14PM (#4999355)
I don't know what your requirements for the handling of images and layout are, but LaTeX does a pretty good job with the type-setting.

If you don't do anything to complicated in your HTML or Markdown, it might be worth trying to generate a LaTeX file and generating the PDF from that.

Re:The Web Book Boilerplate - Writing books for almost every... by TylerE on Wednesday January 02, 2013 @05:37PM (#4999761)
ConTeXt is probably even better if you're doing lots of layouts and inline figures, sidebars, etc.
Re:The Web Book Boilerplate - Writing books for almost every... by jamesbritt on Friday January 04, 2013 @12:42AM (#5006440)
Thanks, this looks interesting.

Since I'm also doing epub/mobi there are some limits on how clever I can be, so my PDF needs are not all that sophisticated.