
: Re: Format for ebook that contains code What's a good format for making an ebook that contains code. Is markdown a good option or is there something better available? I may want to convert it
Leanpub might be a solution. See this section (html) of their manual on code snippets. If you have a lot of code you can put it in an external file and reference it. Leanpub uses markdown and a dropbox folder you share with Leanpub for each book. It generates pdf, epub and mobi so it seems perfect for what you want to do. Their Syntax highligher, pygments supports prolog.
The only downside I have found is the way it handles images. The images have to be at least 300PPI (pixels per inch) so unless you want your book to be huge you have to limit how many images you use. The images look terrible if they are less than 300 PPI.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Jennifer