Demo of html2lrf

This document contains a demonstration of the capabilities of html2lrf, the HTML to LRF converter from calibre. To obtain calibre visit
http://calibre-ebook.com


Table of Contents

Lists

Nested lists

  1. Item 1
  2. Item 2

Definition Lists

Term 1
Definition of Term 1. A multi line definition showing correct blocking.
Term 2
Definition of Term 2


Table of Contents

Tables

A matrix

Column 1Column 2Column 3
Row 1

(1, 1)

Row 2

(2, 2)

Row 3

(3, 3)


html2lrf supports both rowspan and colspan, but no other HTML table attributes, as it uses its own algorithm to determine optimal placement of cells.

Note that if you have custom fonts on your reader, the table may not be properly aligned. Also html2lrf does not support nested tables.

On the next page you'll see a real life example taken from a Project Gutenberg text with no modifications. It shows off html2lrf's handling of rowspan and colspan.

Sample Complex Table of Contents

 PAGE
Prefacev
List of Works of Referencevii
List of Illustrationsxi
ChapterI.History of the Foundation3
II.Exterior of the Church25
III.Interior of the Church33
IV.St. Bartholomew-the-Less and the Hospital63
AppendixI.The Priory Seals73
II.The Priors and Rectors77
III.Inventory of Vestments, etc.79
IV.The Organ80
Index83


Table of Contents

Text formatting

A simple paragraph of formatted text, with a ruled line following it. Superscripts and Subscripts.



A similar paragraph, but now using CSS to perform the text formatting.


A centered phrase
A right aligned phrase A normal phrase

A paragraph containing a <blockquote>

This is blockquoted text. It is rendered in a separate block with margins.
The above text should be distinct from the rest of the paragraph.


A very indented paragraph

An unindented paragraph

A default indented paragraph


Table of Contents

Inline images

Here I demonstrate the use of inline images in the midst of text. Here is a small image embedded in a sentence. Now we have a slightly larger image that is automatically put in its own block and finally we have a large image which is put on a page by itself. Try changing sizes from S to M to L and see how the images behave.


Table of Contents

Embedded fonts

This LRF file has been prepared by embedding Times New Roman and Andale Mono as the default serif and monospace fonts. This allows it to correctly display non English characters such as:

Note that embedding fonts in LRF files slows down page turns slightly.


Table of Contents

Paragraph Emphasis


beautiful image based dropcaps to emphasize this paragraph. Image based dropcaps are specified by adding the class = 'libprs500_dropcaps' attribute to an <img> tag.


This is a plain text based dropcaps. It is not nearly as dramatic, but easier to code ;-)


This is an Example of small-caps. It can also be used to highlight the start of a paragraph very effectively.


A paragraph with a hanging indent. This is especially useful for highly structured text like verse, or dialogue.


Table of Contents

Recursive link following

html2lrf follows links in HTML files that point to other files, recursively. Thus it can be used to convert a whole tree of HTML files into a single LRF file.


Table of Contents