How to make an epub / mobi file
You want to convert your Word Doc to an Epub or Mobi file with a table of contents and chapter breaks for easy eReader navigation & readability. No problem.
- Short Answer
- set doc title & chapter titles to “Header 1” & save as *.html
- Calibre>Convert books>Look & Feel>Remove spacing between paragraphs
Calibre>Convert books>Table of Contents>Level 1 TOC (XPath expression)://h:h1
- Long Answer
You must format your word document and save as html. Then use Calibre to convert the html document to epub and/or mobi and tell it that everything formatted as “Header 1” deserves to be in the auto-generated table of contents. I’ll explain.
- Formatting your document
You can use LibreOffice, OpenOffice, or Word, it’s all the same. I’m running Windows 7, OpenOffice 3.3, Calibre 0.8.24, but this information is generic. If you open a new “Word” doc and type out some text, then what you see is the default unformatted style. It might look like this:
Notice that the above document has a main title at the top of the first page and what we might call a chapter title (in all caps.) Highlight your main title, select “Format>Styles and Formatting” or the equivalent option for changing a “style” in your client, then select from the list of style options: “Heading 1” as shown here:
Repeat this step for every chapter title and save your document as *.html with the “Save As” option. The trickiest part of formatting your document is finding the “Heading 1” style option for your particular word processor. After you’ve saved as html, then you upload it into Calibre.
- Converting with Calibre
Download and install Calibre. Open it and you’ll see something like this:
Begin with the big red “Add books” button in the upper left and select the html version of the document you just saved. Once loaded into Calibre, hit the “Edit metadata” button and enter the title as it should be, this is the title you’ll see listed when you load it onto your ereader.
Now hit “OK” to exit back to the main screen and hit “Convert books,” this is where the action is.
The “Convert books” window pops up. In the upper right corner of this screen find the “Output format” menu, select MOBI or EPUB. You can’t do both at once, but you can do one then come back and do the other.
The left side menu has several items, but you’ll only need “Look & Feel” and “Table of Contents.” In “Look & Feel” select “Remove spacing between paragraphs.”
In “Table of Contents” select the wizard button to the right of “Level 1 TOC (XPath expression):”, in the new window that pops up, open the drop down menu labeled “Match HTML tags with tag name:” and from that list select “h1” then hit “OK.” You’ll now see “//h:h1” listed in the Level 1 TOC field.
Hit “OK” and Calibre will immediately begin converting.
Conversion should take a few seconds. If you converted to MOBI the first time, then hit the “Convert books” button again and select EPUB to convert to that format. Then you’ll want to hit the big “Save to disk” button. Actually, saving is a bit unorthodox and worth a mention.
What you’re saving is actually a directory (author’s name) with a set of files (all their works.) Because off this, you’ll want to save all your Calibre conversions into a super-directory called “authors” or some such. If you embiggen the picture above you’ll see our location is
- Documents>My Documents>My eBooks>authors
This is where you want to be, with the “Folder” field at the bottom of the window blank when you press the “Select Directory” button. It’s kind of weird, because it feels like you are not actually selecting a directory. But what happens is that Calibre will search this directory for the author’s name and either save to that author’s directory if it’s already been created, or create it if it’s not yet there. Sounds confusing, but I promise you this is a very cool feature.
Play with it and you’ll see what I mean.
You’ve formatted your document and saved as *.html. You’ve used Calibre to convert it to an epub and/or mobi file. Now you just need to email that file to your ereader account, or manually upload it, or use your preferred method to get that file onto your ereader, and you’re done.
For the record, I will not provide any technical help or answer any tech questions regarding the above information, so please do not ask. I’ve put it all out there, that’s all I know. If you have questions regarding information not covered above, then I recommend searching on Google and asking in forums. Good luck.