LEARN@IGP

Infogrid Pacific-The Science of Information

10

Kindle Packaging Details

The section covers the packaging details of Kindle format. Updated: 2015-03-02

Kindle Format

With the release of Kindle Fire Format Version 8 the Kindle Mobi Version 7 format is no more available as it had its own set of drawbacks with no support for CSS3, HTML5 and Multi Selectors in CSS. There is now one standart format that can be generated and is named as Kindle.

The Kindle Format also popularly referred as KF8 has much broader support for HTML5, CSS3 as compared to the older Mobi.

The Implementation

Kindle (KF8) can be generated through IGP: Digital Publisher. However there are numerous changes implemented in order to make this available. Here are few highlights.

CSS - Kindle (KF8) will use the default Reader CSS available in IGP: Digital Publisher and has no co-relation with the Mobi CSS which is a separate entity defined in the CSS Editor. However on generating Kindle (KF8) format the package will include the Mobi CSS for old Mobi format and the Reader CSS for Kindle (KF8). The reason to include both the CSS statements in the final package is to support the old devices which do not support CSS multi selectors, CSS3 and  HTML5.

To explain this further we have used the example of the below media statement.

  • media="amzn-mobi" - Media statement used for Mobi
  • media="amzn-kf8" - Media statement for Kindle (KF8)
<link href="9781743323700_mobi.css" media="amzn-mobi" 
rel="stylesheet" type="text/css" /> 
<link href="9781743323700.css" media="amzn-kf8" 
rel="stylesheet" type="text/css" />

When a Kindle (KF8) format is generated the packager will include both Mobi and Kindle (KF8) CSS references in the Kindle Fire xhtml files as shown in the above example. Depending upon the type of device used to view the file the required CSS will be picked up by the device and the file can be viewed correctly.

CSS Package File Naming

The package file naming for Kindle (KF8) and Mobi Format is as follows.

  • Kindle (KF8) file will always a file extension as - "ISBN.css"
  • Mobi file will still continue to have the file extension as - "ISBN_mobi.css"

CSS Class Merging

Multi Selector CSS did not work in Mobi 7 format. However with the implementation of Kindle (KF8) format this will be supported. To meet this requirement we have combined the HTML classes that were used for Mobi 7 and a new classes for Kindle (KF8). So the class statement or class value will contain both the classes. The first class will be the one for Mobi 7 which is merged and this merge class is created using existing class vlaues. The remaining next classes will be used by Kindle (KF8).

Note: In the process of making the Kindle (KF8) format available in IGP: Digital Publisher we have undertaken some major class value reductions in the output HTML. This has lead to changing many class values due to which we have a made a lot of amendments in the existing Mobi CSS.

To explain how this will be put into effect. Lets take an example of an existing document, that was created in the recent past and you now need to generate a Kindle (KF8) format for this document. In case of this exisitng document you will need to first reset the Mobi CSS. A way to do this is. Click the Mobi CSS button. Once the Mobi CSS has successfully launched you need to then click the Reset button and the Mobi CSS for the particular document will be reset.

CSS structure for Reader CSS

Certain changes are also made to the Reader CSS for obvious reasons as the "Ordered List" (<ol>) structure was not fully supported by devices which can read Mobi 7 format. On the other hand this is not a limitation with the Kindle (KF8) format when read in any of the devices.

However to make this as a even situation for both Kindle (KF8) and Mobi formats and without having to play much around with the CSS we have implemented a change in the output HTML and the Reader CSS aswell. 1

The <ol> structure is now changed to <p> (paragraph) structure along with certain classes. And through these classes we have managed to handle the display for the both formats i.e Mobi7 and Kindle (KF8).

Kindle Gen

The current version of Kindle Gen used in IGP: Digital Publisher is Kindle Gen Version 2.8. However this version also brings certain limitations. The Kindle formats generated through Kindle Gen Version 2.8 cannot be extracted or unzipped.

Document Processing Instructions

The Kindle Processing Options of Document Processing Instructions (DPI) form would use same for "Kindle (KF8)" format and all the options available here can be used like before. There are no changes made here as of now.

Formats on Demand

The earlier formats on demand interface had two options available for Kindle under the category eBook Formats which were "Kindle Mobi" and "Kindle (KF8)".

However with the implementation of Kindle (KF8), there will be one standard option that will be available in the Formats on Demand interface and this is called "Kindle". This format will support Mobi 7 along with "Kindle (KF8)" format.

1 KF8 (Reader CSS) CSS manual update:
Following CSS will go into the end of the 'F08 NAMED LISTS' CSS major css category and should be exact place before "F08 DOCUMENT DESIGNER Starts" css block.

/* KF8 SUBSTITUTE STYLES starts */
/* ----- ========== TOC DETAILS ========== ----- */
p.toc-fm-rw,
p.toc-bm-rw {
    font-size: 1em;
    font-style: italic;
    font-weight: normal;
    text-indent: -2em;
    padding-top: 0;
    padding-bottom: 0em;
    margin-right: 2em;
    margin-bottom: 0.25em;
    margin-left: 4em !important;
    }
/*Parts and Units*/
p.toc-unit-rw,
p.toc-part-rw {
    font-size: 1em;
    font-style: normal;
    font-weight: normal;
    text-transform: uppercase;
    padding-top: 0;
    padding-bottom: 0em;
    margin-left: 0 !important;
    }
p.toc-unit-rw .toc-num-rw,
p.toc-part-rw .toc-num-rw {
    font-size: 1em;
    font-style: normal;
    font-weight: normal;
    text-indent: -2em;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 2em;
    }  
p.toc-unit-rw .toc-title-sub-rw,
p.toc-part-rw .toc-title-sub-rw {
    font-size: 0.9em;
    font-style: normal;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
p.toc-unit-rw .toc-title-author-sub-rw,
p.toc-part-rw .toc-title-author-sub-rw {
    font-size: 0.9em;
    font-style: normal;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
p.toc-unit-rw .toc-title-contributor-sub-rw,
p.toc-part-rw .toc-title-contributor-sub-rw {
    font-size: 0.9em;
    font-style: normal;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
p.toc-unit-rw .toc-title-other-sub-rw,
p.toc-part-rw .toc-title-other-sub-rw {
    font-size: 0.9em;
    font-style: normal;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
                
/*Chapters, Lessons, Topics, Articles, Sections*/  
p.toc-chapter-rw,
p.toc-topic-rw,
p.toc-lesson-rw,
p.toc-article-rw,
p.toc-section-rw {
    font-size: 1em;
    font-style: normal;
    font-weight: normal;
    text-indent: -2em;
    padding-top: 0;
    padding-bottom: 0.25em;
    margin-right: 2em;
    margin-left: 4em !important;
    }
p.toc-chapter-rw .toc-num-rw,
p.toc-topic-rw .toc-num-rw,
p.toc-lesson-rw .toc-num-rw,
p.toc-article-rw .toc-num-rw,
p.toc-section-rw .toc-num-rw {
    display: inline-block;
    float: none;
    min-width: 2em;
    font-size: 1em;
    font-style: normal;
    font-weight: normal;
    text-indent: 0;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    margin-right: 0.5em;
    }
p.toc-chapter-rw .toc-title-sub-rw,
p.toc-topic-rw .toc-title-sub-rw,
p.toc-lesson-rw .toc-title-sub-rw,
p.toc-article-rw .toc-title-sub-rw,
p.toc-section-rw .toc-title-sub-rw {
    font-size: 0.9em;
    font-style: normal;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
p.toc-chapter-rw .toc-title-author-sub-rw,
p.toc-topic-rw .toc-title-author-sub-rw,
p.toc-lesson-rw .toc-title-author-sub-rw,
p.toc-article-rw .toc-title-author-sub-rw,
p.toc-section-rw .toc-title-author-sub-rw {
    font-size: 0.9em;
    font-style: italic;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
p.toc-chapter-rw .toc-title-contributor-sub-rw,
p.toc-topic-rw .toc-title-contributor-sub-rw,
p.toc-lesson-rw .toc-title-contributor-sub-rw,
p.toc-article-rw .toc-title-contributor-sub-rw,
p.toc-section-rw .toc-title-contributor-sub-rw {
    font-size: 0.9em;
    font-style: italic;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-left: 0;
    }
p.toc-chapter-rw .toc-title-other-sub-rw,
p.toc-topic-rw .toc-title-other-sub-rw,
p.toc-lesson-rw .toc-title-other-sub-rw,
p.toc-article-rw .toc-title-other-sub-rw,
p.toc-section-rw .toc-title-other-sub-rw {
    font-size: 0.9em;
    font-style: normal;
    font-weight: normal;
    padding-top: 0em;
    padding-bottom: 0em;
    margin-right: 2em;
    margin-left: 0;
    }
/*Conditional spacers in the list*/
p.toc-fm-rw + p.toc-part-rw,
p.toc-fm-rw + p.toc-unit-rw,
p.toc-fm-rw + p.toc-chapter-rw,  
p.toc-fm-rw + p.toc-topic-rw,
p.toc-fm-rw + p.toc-lesson-rw,
p.toc-fm-rw + p.toc-article-rw,
p.toc-fm-rw + p.toc-section-rw,
p.toc-part-rw + p.toc-bm-rw,
p.toc-unit-rw + p.toc-bm-rw,
p.toc-chapter-rw + p.toc-bm-rw,  
p.toc-topic-rw + p.toc-bm-rw,
p.toc-lesson-rw + p.toc-bm-rw,
p.toc-article-rw + p.toc-bm-rw,
p.toc-section-rw + p.toc-bm-rw {
    padding-top: 0.5em;
    }
p.toc-part-rw + p.toc-chapter-rw,
p.toc-part-rw + p.toc-topic-rw,
p.toc-unit-rw + p.toc-chapter-rw,
p.toc-unit-rw + p.toc-lesson-rw,
p.toc-unit-rw + p.toc-section-rw,
p.toc-chapter-rw + p.toc-part-rw,
p.toc-topic-rw + p.toc-part-rw,
p.toc-chapter-rw + p.toc-unit-rw,
p.toc-lesson-rw + p.toc-unit-rw,
p.toc-section-rw + p.toc-unit-rw {
    padding-top: 0.5em;
    }
span.toc-title-sub-rw {
    display: block;
    text-indent: 0;
    }
    
/* ----- ========== INDEX DETAILS ========== ----- */
.index1 {text-indent: 0em; margin: 0em 0em 0em 0em;}
.index2 {text-indent: 0em; margin: 0em 0em 0em 1em;}
.index3 {text-indent: 0em; margin: 0em 0em 0em 2em;}
.index4 {text-indent: 0em; margin: 0em 0em 0em 3em;}
.index5 {text-indent: 0em; margin: 0em 0em 0em 4em;}
/* ----- ========== TOC DETAILS ========== ----- */
p.toc1 {font-size: 1em; text-indent: -2em; margin: 0.25em 0em 0em 2em;}
p.toc2 {font-size: 1em; text-indent: -2em; margin: 0em 0em 0em 2em;}
p.toc3 {font-size: 1em; text-indent: -2em; margin: 0em 0em 0em 2em;}
p.toc4 {font-size: 1em; text-indent: -2em; margin: 0em 0em 0em 2em;}
p.toc5 {font-size: 1em; text-indent: -2em; margin: 0em 0em 0em 2em;}
/* KF8 SUBSTITUTE STYLES ends */

 

comments powered by Disqus