If you’ve worked with e-books, you know that editing them can be a work-flow nightmare. You format the book, save it, convert it, and check it out. When you find issues, you then must reformat, save again, reconvert, and recheck. This can become quite tedious when you run into stubborn or numerous formatting errors that slip through the cracks.
However, that time-consuming process doesn’t have to be so frustrating… at least not when you have Calibre at hand. With this outstanding, open source e-book management software, there’s a lesser-known feature that allows you to edit your e-book, in real time, to remove those formatting (and other) mistakes with ease. You can even do the entire formatting within Calibre and bypass any errors introduced by a middle man.
The only caveat to this process is that it requires you have at least a basic understanding of HTML and CSS (as the editing pane works with both). In other words, you’re not going to be editing a LibreOffice .odt file in a WYSIWYG editor. Also, you must have converted your e-book to either .epub or .azw3 formats (the Calibre editor cannot work with .mobi files).
I won’t go through the Calibre conversion process, so these steps assume you already have your book converted into the necessary format. With that said, let’s walk through the editing process of your book.
The Editing Window
To get to the editing window, right-click on the book you want to work with (from within Calibre’s main window—see Figure 1 above) and select Edit book.
Once opened, you’ll find three panes:
Book navigation (far left) is where you select what you want to view (chapters, styles, images, fonts, etc)
Work pane (center) is where you do the editing of the book
Preview pane (right) displays the contents of the book
What’s important to note is, from within in the navigation pane, you can expand each tree to view individual entries. When you expand the text tree, you will see each chapter of your book (depending upon how you’ve handled the conversion). For example: When I convert books, I always change the conversion wizard to search for the HTML <h3> tag to use as chapter headings. I also instruct Calibre to start a new page with every <h3> tag. Figure 2 illustrates each new chapter of a book.
When you double-click on a chapter in the left navigation, it will open up in a new tab in the editing pane. You can also open up the document style sheet. This makes for a handy reference point as you work through the files (or should you need to make changes to one or more of the styles). As you make changes (to either a chapter or to the style sheet), they will appear in the live preview window. As you switch tabs in the editor window, the preview window will automatically switch to preview what is being edited.
At the bottom of the preview pane, you will notice a toolbar with a few buttons and a search bar (Figure 3). The buttons are (from left to right):
Disable/enable auto-reload of preview
Disable/enable syncing of preview position to editor position
Split file at specified location
The editor pane also has several buttons (Figure 4) that allow you to easily insert tags, images, hyperlinks, formatting, colors, and even a button for beautifying the current working file.
Working with the Editor
Now that you are familiar with the editor layout, let’s take a look at the heart of the tool. As long as you are familiar with HTML and CSS, getting up to speed with the editor should be quite simple. Open up a chapter (or style sheet) and start editing.
If you open a file and find the HTML to be hard to read (some applications like MS Word are very bad at creating HTML), you can click the Beautify button to clean up the code. This will auto-indent and color code the HTML of the file. Figure 5 illustrates how well the Beautify tool works to make your job much easier.
When you complete the editing (and beautifying), I highly recommend you run the Check Book tool. In the main toolbar you’ll see the ladybug icon—click it to run the checker. If it reports errors, address them and rerun the checker. You can also run the built-in spell checker from the Calibre main toolbar (Figure 6).
Once you’ve completed the entire editing process, all you have to do is click the Save button (or Ctrl+S) and the epub (or azw3) file will automatically reflect your changes.
This is an important feature—one you should not overlook. As you work on your book, you can create checkpoints. These checkpoints are restore points that you can revert to, should something go awry in your editing (which could save you a lot of work).
To create a Checkpoint, simply click the thumbtack icon in the toolbar and give the Checkpoint a name. If you find yourself in a situation where you need to revert, click on the Edit menu and you should see the last Checkpoint created. If you’ve created more than one Checkpoint, you can click the View menu and check the box for Checkpoints. This will add an additional preview pane (in the bottom of the left navigation—Figure 7) so you can jump to whatever Checkpoint you need.
Creating and editing e-books doesn’t have to be a struggle. If you’re looking for a way to make this process far more efficient, you should dive into Calibre’s e-book editor and you’ll save time and frustration alike.