eBook Conversion

eBook conversion for Kindle and ePub readers

Samples

Below are some sample HTML files, based on chapters one and two of Jane Austen’s Emma. All of them will output correctly to Kindle format when run through MobiPocket Creator or Calibre.

Please download these files and open them up in a good text editor such as Notepad++, to get an idea of how the HTML and CSS work. The code before the start of the copy is standard for webpages and is created in Notepad when you select TextFX > TextFX HTML Tidy > Tidy.

Download the HTML files by right-clicking on the link and selecting ‘Save Link As’.

No formatting

Emma_basic.htm

This file will display based on the default settings of the Kindle (paragraphs indented).

Spaced paragraphs

Emma_spaced_paras.htm

In this sample, the first line of code produces a centred chapter heading, which always appears at the top of the page. For normal text, a space is defined before and after every paragraph. No paragraphs are indented.

h1 {text-align:center; page-break-before: always; margin-bottom: 2em;}
p {margin-bottom: 1em; text-indent:0;}

Indented paragraphs

Emma_indented paras.htm

In this sample, the first line of code produces a centred chapter heading, which always appears at the top of the page. For normal text, all paragraphs are indented, except the first paragraph.

h1{ text-align:center; page-break-before: always; margin-bottom: 2em;}
p.first {text-indent: 0;}
p {text-indent: 1em; margin-top: 0; margin-bottom: 0;}

Indented paragraphs with drop caps

Emma_indented paras.htm

The same as the indented paragraph version, but with the faux drop-caps applied, as explained here.

Comments are closed.

© Paul Brookes, 2015. Powered by Wordpress.