Book title

by

Author's name

Pachelbel

Table of Contents

Preface

This document was started as a way of developing and testing a template for ebooks, with the aim of making the HTML [1] and CSS [2] W3C [3] standards compliant. As I worked on it it I found that there are differences in the way Mobipocket Creator and Calibre render the same HTML while making a Mobipocket document, so I have produced separate versions with Mobipocket Creator and with Calibre. Any differences therefore are due to these programs rather than with Mobipocket itself – though its rendition of HTML certainly is very poor.

I have tested both versions on the Mobipocket desktop reader and on my Cybook Gen3, but do not know how they will display on other ebook readers.

This version was created on 15 July 2009

Chapter 1: Tests text and font etc

Most browsers show paragraphs justified left with a white space line equivalent between each paragraph. The paragraphs in this document have had their top and bottom margins set to zero which removes the white space.

Mobipocket set an indent at the beginning of each paragraph, Calibre does not. This paragraph has been left justified to remove the indent in the version produced my Mobipocket Creator. This will have no effect on the way the text is shown in a browser or in the version produced by Calibre.

This line should be indented 1em with internet browsers and Calibre.

This line should have a 1em space between it and the next line.

The words in this line of text should be modified in various ways. Bold, italic, small caps, larger, smaller, small subscript, small superscript.

Some special characters are :

© © copyright,
é é e acute,
è è e grave,
ê ê e circumflex,
— — m dash, and
– – n dash

The text at the end of this line should have a grey background.

The text in this line should have a space between it and the text above.

Chapter 2: Tests Blockquote

One of the many egregious ways in which the Mobipocket format violates W3C standards is that for it to display blockquoted text indented it requires that the text be placed directly in the blockquote element rather than within paragraph tags which are themselves within the blockquote element. The resultant HTML will not validate, and therefore may cause unexpected results in more civilised formats like ePub.

One way of fixing this problem is to put the text into paragraphs which have been modified with the CSS.

Lorem ipsum [1] dolor sit amet, consectetuer adipiscing elit. Nam bibendum tempor nulla. Sed commodo. Aliquam feugiat lorem nec sem. Nullam consequat tristique libero. Suspendisse id erat. Duis ante sem, laoreet nec, nonummy non, posuere at, sapien. Nam porta. Cras sapien tortor, vehicula at, scelerisque quis, consequat at, enim. Fusce quis tortor. Quisque magna. Proin nunc. Phasellus purus metus, tempus a, lobortis in, mollis sed, erat. Nulla facilisi. Curabitur wisi.

The result does validate, and so should work in other ebook formats.

Chapter 3: Tests lists

Lists normally have a blank line above and below. In this document this has been removed by setting ul margin to zero in the CSS.

And the same for ordered lists

  1. First item in ordered list
    1. 1st subitem - should be 1.a
    2. 2nd subitem - should be 1.b
  2. Second item in ordered list
  3. Third item in ordered list
  4. Fourth item in ordered list
  5. Fifth item in ordered list

Of course if one wants to retain the blank line one either leaves the margin alone in CSS or adjusts the margin or line height of the paragraph above or below.

Chapter 4: Tests end notes

Many ebooks have footnotes which at the bottom of the page to explain or expand on a term in the text without disrupting the flow of the text. For ebooks the concept of end of page is meaningless, so the footnotes should be move to the end of the section or to an End Note page towards the end of the book. If there are many end notes [1] then they can be separated by section or chapter as here.

End Notes

Preface

  1. HTML Hypertext Markup Language
  2. CSS Cascading Style sheets
  3. W3C The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web

Chapter 1

Chapter 2

  1. Lorem ipsum is a standard document in mock Latin used as a filler to test page layout

Chapter 3

Chapter 4

  1. end notes are analogous to foot notes in a print book

Colophon

This XHTML document and it CSS document were prepared with the CoffeeCup 2008 HTML Editor, and the text added manually.