Lurker News

Comments (78) 34 threads

Earlier comments
sspiff#
The front page and demo's seem to be all about interactive on-screen books. Does GitBook also do things like pretty PDF export? (Converting the HTML to PDF does NOT count!)
eslaught1 reply#
Cool. I built a somewhat-similar tool [1], which doesn't handle any of the interactive examples, but generates physical books (PDFs) and ePub, etc. I'm getting close to publishing my first "real" book with it, which should be cool to see.

[1]: https://bitbucket.org/elliottslaughter/bookmd

andrey-p1 reply#
This looks pretty good. It's very similar to something I built [1] to scratch my own itch for some illustrated short stories I've been self-publishing.

I needed some more fine-grained control over page layout so I did go down a completely different route for generating PDFs - I do manual pagination and render the PDF pages using PhantomJS - but generating ePubs is something I've been wanting to do for a while.
Hope you don't mind me looking through your code to see how you've handled ePubs.
[1]: https://github.com/andrey-p/apocalism-js

eslaught1 reply#
Go for it. That's why it's open source. :-)

For BookMD, I use Pandoc [1], which is the most versatile Markdown generator in existence. Pandoc has out-of-the-box support for ePub, so I just use that.
The part where more customization is needed is if you want page breaks. For PDF output, Pandoc lets you use Latex directives in your Markdown (\newpage, etc.), so that should work fine. For ePub, I'm not actually sure what you would do, or whether you would even want the same sort of pagination.
[1]: http://johnmacfarlane.net/pandoc/

andrey-p1 reply#
Hmm, that's not quite what I want in that case - I've used Pandoc before but I want pretty strict control over the way things are converted since I use my project to build books where layout is almost as important as the content. That's why I went for manual pagination and page-by-page conversion with PhantomJS rather than using Pandoc.

Continue this thread — 1 reply

daviding2 replies#
Just as a heads-up, the font 'appNormal' looks like this on Windows / Chrome 33:

http://i.imgur.com/mXfy7NR.jpg
Looks great on OSX etc, so as this is about beautiful books wanted to say. Hope that helps, and good luck with the idea - looks really interesting.

sqrt172 replies#
AFAIK, Chrome/Windows does not do font antialiasing/smoothing, which it does do on Linux and OSX.
mjgoeke1 reply#
More important than "smoothing" - the font baseline is all over the place
daviding#
Yep, it's the baseline. It looks even worse in IE11

http://i.imgur.com/jWcyrz6.jpg
Normally comments like mine can be a bit pedantic, but in this case it's the front page of something that 'builds beautiful programming books', so I think relevant.

thejosh#
It still looks terrible on Linux for me as well.
matt_heimer#
Same problem on FF ESR 24.4.0

Load more comments