22

The answer is yes. You can use John MacFarlane's Pandoc to directly generate EPUB 2 or EPUB 3 from markdown.


20

Leanpub.com accepts Markdown only from authors. They use some extensions like tables or source code embedding to take most of the pain away. Markdown doesn’t offer such a fine control like TeX/LaTeX, but most ebook readers wouldn’t honor that anyway. You can take a look at the free samples (example) to judge the result. I think, yes, Markdown is an ...


13

Yes, I think it may be used and, in my opinion, it makes it easier to layout and format the whole text. There are tools that allow you to type using Markdown and do export to epub and mobi formats among others. One example of such tools is Draft UPDATE: I have recently edited and published a book using Markdown and the gitbook project. It worked perfectly....


7

Embedding code in EPUB can be accomplished with pure HTML and CSS. The <code> tag and monospace attribute will bring you most of the way. See https://github.com/oreillymedia/HTMLBook for a lot of detail.


5

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. An example blog: http://ianhocking.com/2013/06/22/writing-a-novel-using-markdown/


4

I believe that tex4ebook auto-converts from LaTeX to ePub using SVG for math. Looks a little complicated to set up, though. (I haven't tried it personally.)


4

For my ebook experiment, I use PNG, via Formula Sheet.


4

Markdown is an excellent shortcut to HTML, especially for non-technical writers and editors. Some publishing services (Leanpub, Gitbook, PenFlip and others) make the most of this. 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 ...


3

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. 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 ...


3

I was able to work around the issue as follows: $ pandoc -S -o mybook.markdown mybook.tex $ pandoc -S -o mybook.epub --epub-cover-image=images/my_cover.png title.txt mybook.markdown By converting the LaTeX file to markdown, the second pandoc command was able to apply the Title, Author and Date information in title.txt to the epub file.


2

I just use Pandoc and specify all .md files on the command line. Here is an incomplete command line: pandoc [some options] 1.md 2.md 3.md. Source files go last, after all other options, on the command line.


2

I found two things. For me the link has to be written '( ./6.md )' with a space before and after the file specification. Then I found the ebook-convert app wants html files for inputs. It complains that the inputs are "binary"


2

I don't think there is any reference style suitable for both print and ebook. Certainly footnotes look better in printed books, though I think EndNotes would be a better compromise solution for both medias. One problem with ebooks is that the semantics can be different when you are trying to come up with something resembling footnotes. In epub3 there is ...


2

I have used Markdown to create content, then used Pandoc to convert that content into ePub format for reading on iBooks. 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. If your intent is to have finer layout control, with drop caps and ...


1

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 ...


1

You can use LaTeX. Packages like listings or minted can be used to include code snippets and syntax highlighting. Both are supported by tex4ht, so conversion to html and then epub is possible. And as bonus, you can get perfect PDF file. If you are interested, I have a sample document (in Czech language, but I hope the code is readable) where packages minted ...


1

If you don't have to include long blocks of code, maybe the simplest way is to use some form of styled html/xhtml where you will define that code text will use a fixed width font, that you usually should include. Starting from html will make subsequent conversion very easy. If you have to include long blocks of code, maybe there are better solutions, but I'...


1

It is possible to use Markdown to do that, but it is not in my experience, the best option. Reason for this is that what you should really do is incorporate the code from from real programs that can be tested using some (unit-)test harness. That way there is far less chance that the code you include in your book contains some error that would go unnoticed ...


1

(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.) Yes. I've converted several PDFs into text, then Markdown, and then into an EPUB. Markdown is not as "cluttery" as say, raw HTML, so it's easier to read. And it's easier for beginners to learn ...


Only top voted, non community-wiki answers of a minimum length are eligible