Hacker News new | comments | show | ask | jobs | submit login

Interesting. I agree that using something like Pages or Scrivener (I love Scrivener) can help you to focus on the writing and I wish I could have used them to write my book [1].

However, I'm curious to know how he handled code examples; did he just pasted them in Pages? One advantage of using something like Sphinx is to be able to include code examples from external files. This makes it easy to update and test the examples. Another killer feature is pyobject: it allows you to include only a Python function or class from a larger file. It'd be nice to have this feature for other languages, though.

I blogged about using Sphinx to write my book here: http://pedrokroger.net/2012/10/using-sphinx-to-write-books/

[1] http://musicforgeeksandnerds.com

FYI I used a Ruby library called Coderay to handle code highlighting. This wasn't integrated with Pages, but instead with the Bookshop Ruby gem after I moved the text into HTML files.

The code was inline in the HTML, but set apart using pre tags.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact