# 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
- Tables
- Text formatting and ruled lines
- Inline images
- Embedded Fonts
- Paragraph Emphasis
- Recursive link following

## Lists

### Nested lists

1. Item 1

- Sub item 1
- Sub item 2

1. Sub sub item 1. This is a multiline item with almost correct blocking.
2. Sub sub item 2

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 1 | Column 2 | Column 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
Preface | v
List of Works of Reference | vii
List of Illustrations | xi
Chapter | I. | History of the Foundation | 3
II. | Exterior of the Church | 25
III. | Interior of the Church | 33
IV. | St. Bartholomew-the-Less and the Hospital | 63
Appendix | I. | The Priory Seals | 73
II. | The Priors and Rectors | 77
III. | Inventory of Vestments, etc. | 79
IV. | The Organ | 80
Index | 83

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:

- mouse in German: mūs
- mouse in Russian: мышь

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