Forum: ebooks.stackexchange.com
Tags: <writing><markdown><source>
Title: Is Markdown a viable source format for writing ebooks?
Question: I've for some time enjoyed using Markdown to handle straightforward text formatting, image presentation and the like, which I use for keeping notes, or drafting blog content. I'm aware that different file formats can be used as sources for ebooks, but given that Markdown doesn't have as many formatting capabilities as, say, Word, can it be used for laying out and formatting ebook content?

Answers:
sents: text: The answer is yes.
text: You can use John MacFarlane's Pandoc to directly generate EPUB 2 or EPUB 3 from markdown.
answer_details: author: ebooks.stackexchange.com/users/60/Anthon
score: 21
sents: text: Leanpub.com accepts Markdown only from authors.
text: They use some extensions like tables or source code embedding to take most of the pain away.
text: Markdown doesn’t offer such a fine control like TeX/LaTeX, but most ebook readers wouldn’t honor that anyway.
text: You can take a look at the free samples ( example ) to judge the result.
text: I think, yes, Markdown is an excellent format to write ebooks.
answer_details: author: ebooks.stackexchange.com/users/17/fuxia
score: 20
sents: text: Yes, I think it may be used and, in my opinion, it makes it easier to layout and format the whole text.
text: There are tools that allow you to type using Markdown and do export to epub and mobi formats among others.
text: One example of such tools is Draft UPDATE:
text: I have recently edited and published a book using Markdown and the gitbook project.
text: It worked perfectly.
text: I will do it again!
answer_details: author: ebooks.stackexchange.com/users/70/Alexandre Marcondes
score: 13
sents: text: Markdown does not seem to have many formatting options, but it looks like it is being used for creating ebooks, since there seem to be many books about creating ebooks from markdown from a google search.
text: An example blog: http://ianhocking.com/2013/06/22/writing-a-novel-using-markdown/
answer_details: author: ebooks.stackexchange.com/users/68/user17915
score: 5
sents: text: Markdown is an excellent shortcut to HTML, especially for non-technical writers and editors.
text: Some publishing services (Leanpub, Gitbook, PenFlip and others) make the most of this.
text: The drawback with most markdown-based publishing services currently is that they use flavours of markdown that don't support classes (technically, 'attribute definitions' for elements).
text: That is, you can't use classes to distinguish, say, an epigraph from a dedication, or a normal blockquote from a 'box' blockquote.
text: Without classes, you cannot reproduce the typography required for high-quality books more complex than a novel.
text: For attribute support, the best flavour of markdown to use is probably kramdown.
text: Jekyll, and therefore GitHub Pages, support kramdown by default.
text: I use Jekyll to create book-ready HTML from markdown for clients, using this workflow we developed for our own book-production work.
text: Used with Sigil for ebook assembly and PrinceXML for PDF output, we're producing book interiors as good as anything we get from InDesign.
answer_details: author: ebooks.stackexchange.com/users/5935/Arthur
score: 4
sents: text: Markdown is fine for most common textual purposes, but if you are creating complex material, or material which you want to re-use for other purposes, you might want to look at one of the many XML formats.
text: Both DocBook and TEI are in extensive use in publishing for complex work, but at the moment you still need to learn how XML works in order to use an XML editor properly.
text: There are many toolchains for turning XML into EPUB and other formats.
text: In general, it's better to have the master file in a powerful and comprehensive format, so that leaner or simpler formats can be generated from it.
text: If you use something too lean for the master format (and Markdown tends towards the lean end of the spectrum), you risk running out of steam when you need to do something difficult or complex.
answer_details: author: ebooks.stackexchange.com/users/339/Peter Flynn
score: 3
sents: text: I have used Markdown to create content, then used Pandoc to convert that content into ePub format for reading on iBooks.
text: Markdown does not have a lot of layout features compared to LaTeX. If you want something fast and quick for images, simple tables and text, Markdown will work great.
text: If your intent is to have finer layout control, with drop caps and the like, you might want to look at something else, like Adobe InDesign.
answer_details: author: ebooks.stackexchange.com/users/5156/StandardEyre
score: 2
sents: text: (While the original question is older, my answer is relevant to show that Markdown continues to have value in more cases than you think, even as Markdown evolves.)
text: Yes.
text: I've converted several PDFs into text, then Markdown, and then into an EPUB.
text: Markdown is not as "cluttery" as say, raw HTML, so it's easier to read.
text: And it's easier for beginners to learn for a markup language.
text: Plus, any Markdown can be converted to many different formats given the right convertor program, like Pandoc .
text: So, Markdown is valuable because it's a starting point to make other formats.
text: Part of my job is finding a "base format" for organized data, and text, so I can convert that to other formats for a wide variety of customers.
text: So the concept of a "base format" is very important to me.
text: Markdown is valuable for ebooks because most ebook readers only support a very small subset of the EPUB spec anyway.
text: So while Markdown is limited, that's exactly what you want
text: so your book reads on the greatest number of reader software and hardware.
text: Weak points of any markdown includes ambiguous interpretation of the formatting, something Commonmark is trying to address.
answer_details: author: ebooks.stackexchange.com/users/6441/Bulrush
score: 1

Summary of the answers:
You can use is to write ebooks. It makes it easier to format the book. It does not have many formatting options, so if you want more control then you might want to look at Adobe InDesign.
The general consensus is that Markdown is a perfectly acceptable option for writing ebooks.