Once the paper version of How to Start a Business in Taiwan was done, creating an ebook version didn’t look like a hard thing to do, but as always, the devil was in the details.

The starting point was the original Word document that was used for the paper version. That can be good for printing, but it is pretty hard to maintain on the long run, especially the formatting, to have a consistent look for the entire document. Quite often one would have to manually edit the entire document. That’s more than 300 pages, and manual editing is not really foolproof or reliable even for a few pages. Think about what happens when you set the section headers to some font size, say 14pt, then later you relaize that half of them are set to 12pt by accident….

Ebook publishing in general follows a more automated approach: you write your book in a format closer to plain text, and all the formatting later is left to other programs. Then, if the line “Why Start A Business In Taiwan?” is set as a “chapter header”, then it will be made for sure to look the same as all the other chapter headers. If you decide to change the look of chapter headers, maybe add numbering, maybe adjust the font size or aligment, it’s all taken care of separately from your book’s text.

We have chosen Leanpub to do the heavy lifting of conversion from this plain text format into the suitable ebook formats: PDF, mobi (Kindle), and epub (iPad, among others). They require the book to be in Markdown format (with a bit of Kramdown, for those who are interested in the technical details). In Markdown the above screenshot looks like this in a text editor:

The hash (#) marks the chapter header, double hash (##) the section header, paragraphs are divided by empty lines, and so on… Of course, this is very much the surface of the whole complexity of formatting a text. There are a lot of other issues that crop up in the process of formatting:

Using links in the text: ebooks are read on computers, thus links can be just like on websites, instead of showing the link location. That looks much prettier (and professional, in my opinion), on the other hand, it might not be as suitable to use the same files (eg. PDF) to publish the print and electonic versions of the book. This needs a bit more investigation.
Using footnotes with links in them: these can be interesting edge cases for Leanpub’s software.
Mixing English and Chinese: if the book is either just English or just Chinese, it looks good. If it’s mostly English with some Chinese characters in it (like it is the case for us), have to do some manual magic of writing {chinesefont} before the segment of text in Chinese to switch to the appropriate fonts, and {latinfont} later to switch back. There are some cases when this doesn’t work well, eg. link titles, there cannot really switch font, thus had to be creative with formatting of the names and links of Taiwanese websites.
Tables can be tricky at first to format well, especially because sometimes the original book crammed a lot of information into a single table, using a smaller fontsize. The ebook adjusts that for clarity, and the end result are often much prettier and more understandable tables.
All in all these are very simple issues compared to the advantages of using Markdown, such as that you can use pretty much any editor to write and edit your book (even your smartphone if you want to); it’s easy to see which parts of the books were changed (there are many so called “diff” tools to tell the difference between text files); don’t have to worry about someone you asked to look at the text for you will mess up the formatting or they don’t have a software to edit things; it takes up very little space;

The original Word document was then copy-pasted into text files step-by-step, each chapter having its own file, and some basic formatting was done. This can be done in an hour or so, maybe even less.

When sigining up to Leanpub as an author, it connects to your Dropbox account, and creates a directory for the book that you start. Putting all these Markdown formatted text files, the cover image, some other text files that tell Leanpub about how to assemble the book (think the order of chapters, where is the frontmatter and backmatter), and that’s all. Once you have a version you want to check out in glorious ebook format, let Dropbox sync, then press the “Create preview” button on the Leanpub website. When only previewing a single chapter, that is done in about a minute, while previewing the whole book is 2-3 miniutes. In the end of the process, the website sends you an email that your book is ready, and you’ll see it magically appear in your Dropbox folder.

For example, this is how the PDF version of the above Markdown looks like:

Pretty neat. Though while the original copy-paste of the book is about an hour, the fine-tuning to a production ready version is closer to 3-4 days. It takes a little practice, and most of the time edge cases need the most effort, and waiting for the new version of the PDF compiled to see what difference my changes made in the look.

When all that is satisfactory, the next step is to set up the landing page of the book, by adding some information about it, and about the author, pricing, links, analytics code, categories for the bestseller lists, the whole works. This is a very satisfying stage to be.

The final step is to press the “Publish my book” button, tell the world about it, and see how people come checking out your new creation.

Leanpub’s motto is “Publish Early, Publish Often”, paraphrased from software development where that is a very good way to create successful projects and an engaged community. Since this time we had a book already, it wasn’t published very early, but hopefully we’ll be able to incorporate your feedback much quicker into the book, and make it even better and more useful for everyone, since a new version is always just one press of a button away.

Now you can see the end result of this process (and can purchase it for your convenience) by clicking here to go to How to Start a Business in Taiwan on Leanpub.

Let us know if you publish your own ebook and how did it go!