Live data from Hacker News

Converting Markdown to ePub or Mobi Using Pandoc

themythicalengineer.com

51–56 of 56 posts

Re: Converting Markdown to ePub or Mobi Using Pandoc

#51
post #25

Don't want to be a troll, but if you are writing anything that is not a README and/or is a book or booklet or bookish, do yourself a favor and use Asciidoc instead.

What's your suggested Asciidoc toolchain? (Pandoc will ingest Asciidoc as well as Markdown, FWIW.)

At work, we have been using Asciisoc for 10 years or so, so we use Asciidoc -> XSLT -> PDF / chunked HTML. Works great, not nice to use.

For new projects, we use Asciidoctor - it does everything but chunked HTML, and it's a pleasure to use.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#52

Is Pandoc being used mostly to join the files? I recently started converting Markdown files to epub (and kepub) for my new Kobo. I load the Markdown straight into Calibre though. On a side note, is there some benefit to mobi over epub? Kepub seems to be the preferred format on Kobo, because for some reason it turns pages _much_ faster than epub and gives access to reader statistics (if one cares about that).

Hey, I'm curious about your Calibre usage! I'm working on turning a written book to Markdown, and pandoc has a real pain point on links between chapters. Please tell me more!

What would you like to know? In Calibre you can set regex to indicate what should be used for chapter, sub chapter etc, and it can be used to generate the TOC. So I use Markdown headings, #, ##, ### etc for chapters and subsections.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#53

Is Pandoc being used mostly to join the files? I recently started converting Markdown files to epub (and kepub) for my new Kobo. I load the Markdown straight into Calibre though. On a side note, is there some benefit to mobi over epub? Kepub seems to be the preferred format on Kobo, because for some reason it turns pages _much_ faster than epub and gives access to reader statistics (if one cares about that).

>On a side note, is there some benefit to mobi over epub? AFAIK Amazon Kindle devices can read mobi files but not epub files (unless you convert them to something else first). (The mobi format is older, so if you want to read an ebook on your old Palm Pilot PDA then you'll probably want mobi.)

Thanks for the heads up! As for my palm pilot, well, I'm not sure which drawer that's been in for the last decade or two.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#54
post #51

Earlier quoted context omitted.

What's your suggested Asciidoc toolchain? (Pandoc will ingest Asciidoc as well as Markdown, FWIW.)

At work, we have been using Asciisoc for 10 years or so, so we use Asciidoc -> XSLT -> PDF / chunked HTML. Works great, not nice to use. For new projects, we use Asciidoctor - it does everything but chunked HTML, and it's a pleasure to use.

Thanks.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#55

Earlier quoted context omitted.

Hey, I'm curious about your Calibre usage! I'm working on turning a written book to Markdown, and pandoc has a real pain point on links between chapters. Please tell me more!

What would you like to know? In Calibre you can set regex to indicate what should be used for chapter, sub chapter etc, and it can be used to generate the TOC. So I use Markdown headings, #, ##, ### etc for chapters and subsections.

Checking, it looks like Calibre expects one Markdown file as input, where I have a few Markdown files, linking to each other in a way that works on GitHub. It looks like the sort of thing that either works as-is with luck, or is a pain in the neck and needs massaging.

Re: Converting Markdown to ePub or Mobi Using Pandoc

#56

Earlier quoted context omitted.

What would you like to know? In Calibre you can set regex to indicate what should be used for chapter, sub chapter etc, and it can be used to generate the TOC. So I use Markdown headings, #, ##, ### etc for chapters and subsections.

Checking, it looks like Calibre expects one Markdown file as input, where I have a few Markdown files, linking to each other in a way that works on GitHub. It looks like the sort of thing that either works as-is with luck, or is a pain in the neck and needs massaging.

Ah, yes, I've only been doing this with single markdown pages. I believe people use pandoc for multi-page.

GitHub style linking doesn't really lend itself to "book" format so I suppose there's no auto way to do that.

Post reply on HN