Tag: Calibre

  • Create Clean EPUBs using Calibre

    There are several reasons to generate a clean EPUB.

    • Consistency. Consistent styles to maintain the same look and feel across platforms.
    • Simplicity. With fewer interactions between CSS styles, changes are easier to implement and track.
    • Human readable. Easy to find chapters, sections and styles.
    • Convertible. Simple styles lend to consistent conversions between formats. Creates Microsoft Word documents with fewer embedded Styles.

    Of course, there are disadvantages.

    • Investment. Generating documents requires time and effort. However, since the the styles are reusable, the level of effort for future releases is reduced.
    • Technical knowledge. This requires more than a passing familiarity with Markdown, XHTML, CSS, and Calibre. However, there is pleny of documentation available online to help.

    While the disadvantages can dissuade people from experimenting with this capability, I found it simplified my eBook submission process. I can target Draft2Digital, Google Play, and Amazon Kindle, using one EPUB, and maintain advanced formatting like realistic text messaging throughout.

    This tutorial focuses on features Calibre offers to make EPUB management easier. These tips and tricks may prove invaluable for debugging an eBook in the future.

    (more…)

  • Realistic Text Messaging in Ebooks and Print

    This tutorial covers methods of approximating Text messaging in Ebooks and print. The solutions outlined below use tools that are readily available.

    Reference image for text messaging between two parties.
    Reference image for text messaging between two parties.
    (more…)

  • Realistic Text Messaging in EPUB

    At the heart of an EPUB lies Cascading Style Sheets (CSS) and Extensible HyperText Markup Language (XHTML). This grants the designer control over the look and feel of their eBooks, even in an environment where the reader can affect change at will.

    Designers can implement CSS styles that creates realistic Text message conversations. These elements reflow automatically, maintaining a consistent look and feel across devices.

    (more…)

  • Basic Images Styles in EPUB

    The challenge in designing eBooks are the unknowns. It’s impossible to know what devices your readers will use and these uncertainties stack up. Some of these elements are:

    • Screen size, resolution, and density. I.e., Dots Per Inch (DPI) or Pixels Per Inch (PPI);
    • The margins and visible page size;
    • Font type, spacing, and sizes;
    • Zoom factor; and
    • Orientation of the device.

    Note

    Fonts can be embedded into an EPUB to control the look and feel. However, there is no guarantee that Amazon, Apple, Google, or Kobo will not strip them out in favour of their own. E.g., Bookerly on Kindle platforms.

    It’s important that an EPUB reflow its content to adjust to changes in any of the above elements. A book that reflows ensures a quality reading experience for the reader.

    (more…)

  • Drop Caps in EPUB

    While initial or drop capitals are easy to add using Kindle Create, it’s not straightforward for EPUBs generated with Calibre. Fortunately, you can add the missing component by using their e-book editor.

    To start the process, add the following CSS style to your EPUB‘s stylesheet. This document is normally named stylesheet.css in a Calibre generated eBook.

    CSS Style

    .dropCharacter {
      float: left;
      font-family: 'Georgia', 'Calibri', serif;
      font-size: 5em;
      line-height: 0.8em;
      padding-right: 0.1em;
      padding-left: 0.05em;
      padding-bottom: 0.2em;
      vertical-align: top;
    }
    

    Note

    Instead of using pt, or px to define the dimensions, we use em. This type of measurement is relative, enabling the document to adjust automatically when the user changes fonts or size.

    The next step is to go through every chapter and find the first paragraph. While the converted document’s formatting will differ from this example, it will look similar to this:

    Default Code

    <body>
    
      <h1 class="blockFirstTop">THE VAN HELSING INCURSION</h1>
    
      <h2 class="blockFirstChapter">CHAPTER 1</h2>
    
      <p class="blockSubtitle">THEY’RE MAGICALLY DELICIOUS</p>
    
      <p>Clara had been lying flat against the snow-covered ground
         since the witching hour. The sky was taking on red hues,
         and the moon would soon secede its dominion over the
         celestial plain.</p>
    
      <p>She maintained a low heart rate while her movements were
         kept to an absolute minimum. Freshly fallen snow had
         accumulated during the night, all of which helped to
         conceal her position.</p>
    

    Output

    Screenshot of an EBook with no drop character.
    Screenshot of an EBook with no drop character

    For a drop character the first letter of the paragraph must be wrapped in a SPAN with the class defined. Once the changes are made, the preview panel will update the look and feel.

    For a consistent display of drop characters, consider:

    • Remove the first quotation mark prior to wrapping the character; and
    • Remove additional formatting like bold or italics.

    Adjusted Code

    <body>
    
      <h1 class="blockFirstTop">THE VAN HELSING INCURSION</h1>
    
      <h2 class="blockFirstChapter">CHAPTER 1</h2>
    
      <p class="blockSubtitle">THEY’RE MAGICALLY DELICIOUS</p>
    
      <p><span class="dropCharacter">C</span>lara had been
         lying flat against the snow-covered ground since the
         witching hour. The sky was taking on red hues, and the
         moon would soon secede its dominion over the celestial
         plain.</p>
    
      <p>She maintained a low heart rate while her movements were
         kept to an absolute minimum. Freshly fallen snow had
         accumulated during the night, all of which helped to
         conceal her position.</p>
    

    Output

    Screenshot of an EBook with a visible drop character.
    Screenshot of an EBook with a visible drop character

    That’s it!

    Note

    The look and feel may change based on the rendering engine. Viewing it on Google Play Books may have a a different reading experience Apple iBooks, or Rakuten Kobo.


  • Google Docs Does EPUBS

    Since 7 Mar 2016, Google Docs permits users to export directly to the EPUB format. This feature is purportedly reliable in exporting hyperlinked chapter index.

    featured_google_docs
    Google Docs now exports to EPUB on thestack.com

    Some articles state that Google Docs will import from Microsoft Word and generate a viable working product. So given Google Docs‘ collaborative capabilities and this export feature, this may prove to be an invaluable tool for drafts and early beta releases.

    I am curious as to how this compares with Calibre generated documents. Normally, I export to HTML from Google Docs to create mine and that has worked well in the past.

    Still this is another tool for the shed!


    Filed Under
    Tagged With
Search
%d bloggers like this: