How to make Kindle Book
This is my first trial.
I take a look some documentation and want to try Mobile SDK development Guide for long time I involved in the current company.
I just read some article to create how to write a book for Kindle. And just make it.
This is my first book link Guide Mobile SDK Development(Android)
Let’s explain about steps.
- Write contents in Markdown file (with VS Code)
- Prepare screenshots
- Prepare Book cover
- Convert Markdown to epub
- Review epub (Kindle Previewer 3)
Write book contents by Markdown
I usually use Markdown for git REAME.md, and some small explanation.
We can write Book by Markdown. For editor, I use VS Code. It has mark down preview and easy to check.
I write a Programming book. Sometimes, I use screenshots in IDE.
How to prepare image in book?
It’s just fine to write link (same directory is better to keep)
<img src="./1.png" alt="Android Studio" title="Android Studio"/>
Prepare Book cover
Many web page explains about this. the recommendation is 1600 x 2560 px images.
Amazon requires to upload jpg version when I registered in KDP.
I just draw using inkscape.
Convert Markdown to epub
To submit a book, we need to prepare epub.
Convert from Markdown to epub, there are a lot of tools.
Actually, I recommend to use pandoc.
For Mac users, can use brew to install pandoc
brew install pandoc
To convert epub just easy option (no style, no code block options)
pandoc -f markdown -t epub3 inputfilename -o outputfile.epub --toc --toc-depth=2 --epub-cover-image=cover.png
This is pandoc example.
inputfilename : Input markdown file (.md)
outputfile.epub. : Output epub file name
cover.png : Book cover file name
Markdown converts epub now. All images linked in Markdown also convert properly.
After creating epub, how do we check?
Amazon provides Kindle Previewer to check results of epub
Check results and if there are any problems, back to previous section, check markdown and revise and run pandoc command, again and again.
Actually, there are a lot of problems during preview. Design, text, so I can explain some difficulties and how to resolve this for next blog.