I'm too lazy to write out html tags unless I absolutely have to. Therefore I use tags to indicate document properties, and convert them to html at the end of the formatting process. The general rule is that tags consist of % at the beginning of the line, followed by a single character.
- %c - chapter heading
- %e - chapter end
- %P <djvu file page number> - page separator
- %p - page header
- %w - page footer
- %i <file page no.> <caption> - image
- %y - First paragraph in chapter
- %f - footnote
- tab/8 spaces at start of line - new paragraph.
- footnote references are indicated by @ followed by an optional index number, and can
occur anywhere on the line.
I introduce other tags as I need them, so I've also used tags for subtitles, sections, vertical spacing, horisontal separators, chapter introductions etc.
Why have an end chapter tag as well as a begin chapter tag?
In most cases, this is superfluous, but in some cases there can be text or pictures before the chapter heading proper.
Here's a sample tagged document:
Code:
%P 1
MY GREAT NOVEL
BY
Long-forgotten author
%P 2
dedications, contents and stuff
%e
%P 2
%p INTRODUCTION 1
%c CHAPTER I
%y It was a dark and stormy night.
Suddenly, a voice cried out.
%i 2 A stormy illustration
%P 3
%p INTRODUCTION 2
Why this voice@ cried out,
nobody could adequately explain then and there.
%f Though it was generally agreed to
be a female voice.
%P 4
%p INTRODUCTION 3
Thus the setting for this novel should
have been set.
%e
%P 5
%c CHAPTER II
%y A glorious morning spread happiness and joy...