Table of Contents
HTML is a general-purpose markup language used for electronic documents, mostly for onscreen reading. Some content, however, is more suitable for other kinds of presentation and being able to reuse the same content for different media types has been a design goal of HTML and CSS.
It has been shown possible to use HTML as a format for book publishing. In the authoring process, it was helpful to use a set of class name on HTML element to further classify content. The classes, along with their associated structural elements, mostly served as hooks for the associated style sheet. In particular, the class names helped separate the content into different sections of a book.
The main motivation for developing a microformat for book is to encourage reuse of content for different media types. By offering people a sample HTML file and an associated style sheet, HTML can become a compelling format to use for book production. As such, the class names described in a book microformat are primarily hooks for style sheets to use, and secondarily machine-readable semantics.
Parts of a book
The user interface of books is fairly standarized. There is typically a front cover that includes the title of the book and the name of the author(s). Inside the cover, one will find a table of contents, chapters, and index and so forth. The table below lists commonly used section types.
|frontcover||The front cover|
|halftitlepage||The halftitle page is simple with only the title of the book, and perhaps the name of the authors|
|titlepage||The title page contains (at least) the book title, the name of the author and the name of the publisher|
|imprint||The imprint page typically starts with a copyright statement and also contains information about where the book is printed, its ISBN number etc.|
|dedication||The dedication page is where you find "for mom"|
|inspiration||Many books contain inspirational quotes by other authors.|
|foreword||Many books contain a foreword written by someone other than the authors|
|preface||The preface is written by the authors and often contains an acknowledgement of other contributors|
|toc||Table of Contents|
|lot||List of Tables|
|lof||List of Figures|
|introduction||An introductory chapter|
|chapter||The content itself is typically organized in numbered chapters|
|part||Some books organize sets of chapters into parts|
|afterword||An additional, often unnumbered chapter at the end of the book|
|bibliography||The bibliography lists other books and sources for further reading|
|references||References from the text of the book are often listed in a separate section|
|appendix||Additional information can be organized into appendices|
|glossary||The glossary defines terms used in the book|
|index||The index is a list of keyword with page references|
|colophon||The colophon page contains information about the production of the book|
|promotion||Promotional material from the publisher, e.g., a list of other titles in the same series|
|backcover||The back cover|
In boom, the section names are used as class names on the
Not all books has all sections. A typical novel will have instances of around 10 sections. (My copy of Robert M. Pirsig's "Zen and the art of Motorcycle maintenance" uses these sections: frontcover, inspiration, praise, promotion, titlepage, imprint, preface, inspiration, part, chapter, afterword.) Non-fiction books often use more sections. (My randomly chosen title from O'Reilly uses 16 sections: frontcover, halftitlepage, titlepage, imprint, toc, lof, foreword, preface, part, chapter, appendix, index, bio, colophon, promotion, backcover.)
Are there too many section types?
It may be argued that the list of possible section types is too long for a "microformat". While one should always strive for simplicity, a few things should be kept in mind:
- the section names only affect on attribute on one element (namely, the class attribute on the div element)
- publishing is an established industry and paper-based books are not likely to change. As such, the format describes something that already exists.
Nontheless, some of the proposed sections could be combined. for example, the forewords and the preface are often formatted in the same manner and there is no need to distinguish between the two in the style sheet. Another similar example is the list of tables and the list of figures. And having a colophon isn't that common, is it? However, all the proposed section types are in common use and the cost of listing one more type is small compared to the extra cost of differentiating between sections through other means than standardized class names.
Are there enough sections?
The list of possible section types is seemingly endless. For example, one could have a separate "acknowledgements" section instead of using the "preface" section for this. Also, one could have different types of sections for different types of promotional material. The postcard, which is often included in books, is formatted very differently from the list of other books in the same series. Thus, having several promotional elements would make sense.
However, in the interest of simplicity it is important to keep the number of section types at a manageable level.
In the end, determining the list of section types for a microformat is a judgement call.
Figures are often used in book. From a typesetting persepctive, figures are troublesome as they form blobs that cannot be split over several pages. By classifying figures into different categories, typesetting can be made easier. The following categories are proposed
Other features of a book
Sections types provide a vocabulary for classifying different parts, pages, of a book. Book authors will also need to classify smaller elements, e.g.:
- different kinds of tables: small, multi-page ...
- table captions
HTML has defined the semantics of table captions through the "caption" element. Alas, the quality of deployed browsers is variable and this makes it hard to use the "caption" element in practice. The boom microformat proposes class names for this to go around widely deployed bugs.
Comparison with DocBook
DocBook docbook is an SGML/XML vocabulary which is been developed for "books and papers about computer hardware and software", but it can also be used for other kinds of books. DocBook is a complex specification; it contains around 400 different elements. Some of DocBook's elements are similar to the section types in the table above:
|Section type||DocBook element|
|foreword||not defined, "preface" is recommended|
|lof||not defined, "lot" is recommended|
|references||reference (not the singular form)|
Although DocBook doesn't have elements for all section types, it is still possible for these sections to appear in the resulting publication. For example, an XSLT processor can add a title page in the printed output based on information in DocBook's "author" element.
This underlines a difference between HTML and some other SGML/XML formats: in HTML, content is presented roughly in the same order as it appears in the structure. Other formats, e.g. DocBook, often require a transformation stage where content is moved from abstract elements (e.g., "info") to more concrete elements (e.g., the front and back covers).
HTML does not have the more abstract elements (although "meta" could possibly be used) and subclassing "div" elements in the order of presentation is therefore a pragmatic approach.
- boom - the Book Microformat