Simple Ebook Production With LibreOffice and calibre

In my last post, I promised to make some templates to help you out with using Linux software for your book projects. Here is the first template: “No Dog In This Fight.odt” a LibreOffice Writer file that you can modify and feed into calibre to produce your ebook. Warning: I’m using the latest version of calibre, 2.49, and I didn’t get the results that I’d hoped. The ebooks produced by calibre work fine and the chapters look good but the front matter is not exactly right (mostly, it’s italic and it’s not supposed to be!). This could be fixed using the calibre editor, but the point was to make a template that would work without extensive fooling around. If you want to give it a try, read on.

The challenge I set for this template was to produce a LibreOffice file that you could feed into calibre without going into any special menus, without editing, and without any special fooling around. In other words, a simple file for a simple, functional ebook. As I mentioned earlier, the front matter comes out in italic. When I used an earlier version of calibre to set up my own ebook, it didn’t have this problem.

I produced two files for the ebook: No Dog In This Fight.odt and No_Dog_cover.png. You might want to download them now so you can play. Be sure to make copies so you can muck them up without having to come back here to download them.

I made the cover with two free programs: Inkscape , a vector graphics program, and the GIMP. a raster graphics program.

Some notes on the No Dog In This Fight.odt file.

  • I only used one font, Liberation Serif, which is the current default font in LibreOffice. Liberation Serif is similar in spacing to Times New Roman and seems to work fine for making ebooks. I used different font sizes, bold, and italics. Since the reader can change the font anyway, I made it simple by only using the one.
  • I skipped a Table of Contents in the front. For a novel, which you usually read from front to back, a Table of Contents isn’t so useful when you start reading the book.
  • The .odt file is set up so that calibre will automatically generate an electronic table of contents, which is what you really want for an ebook anyway. (Note: you can have it both ways, but it’s more complicated. I’ll cover that later.)
  • The trick for the auto Table of contents is that the text that says “Chapter 1” is formatted with the “Heading 1” style and it has the word “Chapter” in it. Be warned: if you muck about with the chapter numbers you could cause your auto Table of Contents to go wonky.
  • All of the formatting is done with styles. The styles palette is toggled with the “F11” key or by going under the “Format” menu and choosing “Styles and Formatting.” Type some text and double click on a style to apply the style to the text.
  • You should be able to replace my text with yours to make your ebook.

Once you have your text into the file, you can convert it to an ebook with calibre. Or you could practice with my files and you should be able to duplicate my results.

Here are the steps:

  • Start calibre.
  • In the top left hand corner choose “Add Books”.
  • Navigate your file system and choose your .odt file.
  • After the addition, line for your book will appear in the main window. It should already be selected. If not, click on it.
  • Choose “Edit metadata.” It’s the second icon from the left.
  • Add your name(s) to the Author(s) names in the top left.
  • If you want, add the Author sort name. For instance, mine is Osterhout, John J.
  • To upload a cover: look under “Change cover” and click “Browse”.
  • Navigate your file system and choose your cover file
  • If you like, add other metadata like “Published” (The date of publication), Publisher, and Languages.
    When you are finished with the metadata, click “OK”
  • Click on “Convert books.”
  • In the top, right-hand corner you will see “Output format”. Choose the kind of file you wand to output. For this post, I made three files, .mobi, .azw3 and .epub. The default is .mobi.
  • Click “OK.” This starts the conversion.
  • While the file is being converted, you see an icon going around in the bottom right hand corner of the screen. When it is done, it opens a window to tell you.
  • On the right hand side of the main screen, you should see your cover and underneath, “Formats:”.
  • Click on a format to open the ebook reader and have a look at your new ebook. Cool, eh?
  • To output your new ebook(s) to your disk, click on the arrowhead beside the “Save to disk” icon. (You might have to click on “>>” at the top right in order to see this icon.) Choose your option. I chose “Save to disk in a single directory” because I wanted to output all of my ebooks.
    My output had the original .odt file, the three ebooks, a .opf file that is used by calibre and contains metadata (you don’t need this to see the ebooks), and a .jpg of my cover file, which you also don’t need.
  • These files should be ready to use in your ebook reader.

I produced ebooks in three formats. Here are the links: .mobi, .epub, and .azw3. Your files should be suitable for reading or sharing with your friends. In all three files, the front matter has gone italic. You can correct this is you muck about in the editor with the .css file, but that is for another post.

 

John Osterhout

Leave a Reply