Editing With Calibre

I’ve used Calibre to organize my ebooks for years. Despite an awkward and eccentric interface, it’s a comprehensive tool, which has every feature I could imagine for working with my online library. However, it’s only in the last few months, as I prepare to write a book about creating ebooks that I’ve come to appreciate its abilities to edit ebooks. A couple of minior reserrvations aside,  Calibre’s editing tools prove to be as complete as all its other tools.

Since I am writing for beginners, my current plan is to suggest LibreOffice for writing the file, so that readers have an interface with which they can be comfortable. The only problem is, LibreOffice exports only to EPUB, and its filter drops both numbered and bulleted lists as well as all frames and images, making it useless for all except for all files except the most simply formatted. But happily, Calibre has no problem reading Open Document Format files from LibreOffice. Click the Add Book button in Calibre to import the LibreOffice file, and it can be easily converted in a couple of minutes to EPUB, MOBI/Kindle, or any other ebook format with a reasonable degree of accuracy.

Just as importantly, right-click on the converted file and select Edit book from the context menu, and Calibre opens in an editing window from which the ebook can be tweaked in every means imaginable.

The Editing Window
Calibre’s editing window is a good place to learn about how an ebook is constructed. As you can see from the left-hand pane, a typical ebook consists of a number of files. Most of these files are chapters, but others can be a CSS style sheet, and a table of contents. The left-hand pane aso has controls for embedding fonts and images.

edit-window

Unlike Calibre’s main window, its editing window is laid out efficiently.

In the center of the window, the raw code for the currently selected file displays. Open several ebooks, and you will soon discover that, while all the files contain similar information, how their code is laid out can make a great difference between how easy they are to read. Even though the code ignores white space, generous use of it can make working with the files much easier for humans. You can edit the code in the center pane, and the layout directly effects how easy editing can be — and, in particular, how easy making a mistake can be. In addition, from the File menu, you can create checkpoints or editing bookmarks to help you navigate.

In the right pane, you can see the formatted text. The center and right panes are not synced — which would be convenient — but the right pane can still help you with navigation and checking that any changes you make have the formatting results that you intended.

The Toolkit
The editing window is easiest work with if you are familiar with HTML and CSS. Armed with that knowledge, you can add the code for features that are not part of the menus or toolbars. However, even without that knowledge, Calibre allows extensive editing. In fact, it provides so much control that you should make sure that you have a backup of the original file, just in case something goes wrong.

To start with, between the File menu and the list of files in the left-hand pane, you can add and rearrange the files in the ebook. Content files can be dragged to new positions, or renamed, and you can bulk rename after selecting a file, then selecting another file while holding the Shift file. If you scroll down, other options in the left pane include changing the CSS style sheet that is used for formatting a file, and switching the cover file to another one that has been uploaded to the ebook.

style-sheet

Scroll down, and you have options for such tasks such as editing the CSS style sheet.

From either the menu or the toolbar, other tools are available. After you upload a font, you can apply it to a selected file. Similarly you can position uploaded images, including changing the title page image — which, during import, is usually arbitrarily assigned to the first image in the ebook. Another option is to edit the table of contents.

While working with the code in the middle pane, you have dialogs for different functions, such as positioning and anchoring an image, or automatically adding HTML tags, a feature that can reduce the number of typos. Although the code might look intimidating the first time you see it, the highlighting of html tags, CSS properties, spelling errors and special characters are useful navigation tools that can help you become familiar with what you are looking at.

When you have finished editing, you can remove and clean up CSS properties from a dialog window, and spell check automatically.

cleaning-css

As one of the final touches, you can get a report on CSS errors that you might want to fix.

The final steps should be to validate your edits by clicking Run check in the top right pane. In less than a minute, you get a listing of possible coding errors in the top left pane, and a detailed look at the first possible error in the top right pane. You may choose to click the link to each error and correct it, although Warning errors generally do not stop an ebook from being readable. All the same, different publishers have different formatting standards, so you might want to be sure that even Warnings are corrected. Many of these warnings can be removed by using the dialog for cleaning up the CSS style sheet and removing duplicate entries.

validation

Calibre’s editing window includes a built-in validator.

 

 

 

 

Should you run into problems, especially while learning Calibre’s editing tools, you can click for extensive online help. The help is concise, but can help bring your attention to features that you might have overlooked — and that can help you solve your problems.

Shortcomings
Computing is littered with discontinued projects for composing and managing HTML, CSS, and ebooks. However, of all the ones that remain, Calibre is the most fully-featured one that I can find. I can think of only two shortcomings.

First, while the reliance on dialog windows is convenient, it leaves users in the dark about what is happening. For example, from Calibre’s editor, you can quickly add metatags, but the experience leaves users with no understanding that metatags are simply a list at the top of the file. As a result, although basic editing can be done quickly, users do not learn what is done.

Second, while an editor for manual changes is available, it is squished into the middle of the screen by default, and the ability to resize it — or revert to the original layout — is not immediately obvious. Even more importantly, it would be more useful if it included a list of CSS tags that could be dragged and dropped. As things are, to make full use of the editor, you need to have a reference window open if you are editing a style sheet or CSS elements — which can be difficult, since Calibre is designed to be used full-screen.

Probably, though, users will care more about results than learning what they are doing. And, in contrast to the top level interface for managing ebooks, Calibre’s editing tools get the job done with a minimum of fuss.

[sharedaddy]

3 thoughts on “Editing With Calibre

  1. I thought I may have been the only person that was still aware of Calibre’s editing capabilities. Either that or others were unable to stomach the rest of Calibre’s interface long enough to utilize the editor for any meaningful amount of time to even report on it.

    Calibre’s abilities have allowed me to ‘fix’ the readability of poorly implemented ebooks since it first came to my attention. I discovered the power of its editor by sheer chance due to insatiable curiosity and desire to discover what’s possible. Since I do have some HTML and CSS skills it ended up being fruitful.

    If ever a piece of software was in more need of a facelift. In spite of its visual shortcomings, Calibre remains one of the most useful and necessary utilities I use. While attempts to create something better, or at least different have sprung up over the years nothing else can really come close. Further, it is becoming clear that nothing ever will.

  2. What I find intriguing about Calibre is the amount of activity surrounding this product. Its website indicates that it is now on point release 3.35 (as of 12/07/19), from Rel. 3.27.1 (07/06), and the tempo averages one or two releases every thirty days.

    From the website–

    “…?The secret of calibre’s success is its vibrant user community…”
    …?If you come up with a cool idea and a patch for implementing it, let us
    know about it and more than likely it will be in the next weekly
    calibre release…”

    What an impressive product and organization!

    • I totally agree. It pretty much stands alone and I am not aware of any other software that can even compete with its feature set. I do feel it is long overdue for a makeover. It has looked virtually the same since it first released.

      The Gimp photo editor was running neck and neck with it for longest used interface without a change. Gimp finally got a long overdue facelift and it looks stunning. I am afraid since Calibre does not have any real competition, makeovers are not a high priority for its developers.

Leave a Reply