Encoding document appearance: rendition ladders

rendition place alignment indentation typeface font capitalization
rend slant case

General notes on the use of the rendition ladder in the rend attribute, overview of keyword/value structure

To permit the capture of renditional information about the source text, the TEI provides the rend attribute, which is available on all relevant elements. In many projects, this attribute is used in a very simple way to capture a few aspects of rendition such as the presence of italics, as in this example:

<emph rend="italics">

This simple approach works well if you are capturing very little renditional information. However, projects wishing to represent the document’s appearance in more detail will find that this approach does not scale up very well; values like italicsboldindentcaps are impractical for a number of reasons. The rend attribute needs to have some internal structure in order to be comprehensible and processable. To accommodate more complex renditional information, the WWP has developed a system called rendition ladders which has been endorsed by the Digital Library Federation. This system allows the contents of the rend attribute to be expressed in a structured form, so that each separate piece of renditional information can be identified and given a set of controllable values.

The rendition ladder is composed of a set of keywords, each with an accompanying value in parentheses. Each renditional quality (typeface, indentation, alignment, etc.) is given a keyword which is in turn paired with a value or a series of arguments; these pairs of keywords and values/arguments are strung together to make the renditional attribute value:

<head rend="align(center)case(allcaps)slant(italic)">Chapter 1</head>

The order of the keyword-value pairs does not matter. Keyword-value pairs may be separated from one another with a space, but this is for readability only; the space will be ignored when the encoding is parsed. However, within a keyword value, where the value is a string of characters to be printed (such as in the pre or post keywords, which indicate characters printed before and after the element), a space will be regarded as part of the character string. Thus in the following examples, 1 and 2 are equivalent, but 3 and 4 are not.

  1. rend="slant(italic) case(smallcaps)"
  2. rend="slant ( italic)case (smallcaps)" [space here is not significant, because it preceds a piece of controlled vocabulary]
  3. rend="pre(&mdash)"
  4. rend="pre( &mdash )" [space here is significant, because it is part of an actual string of characters to be prefixed to the element’s content]

It is only necessary to specify the keyword-values which differ from the defaults: either the defaults set by the encoder in the tagsDecl or the global defaults which are assumed about the text. (For more information on renditional defaults, see the entry on renditional defaults.) For instance, we assume that unless otherwise specified, the value of the indent keyword will be 0.

Specifying a keyword twice is allowed, but has no purpose. In such cases, the last occurrence (as you read from left to right) is used, and the others are ignored. Thus an element with rend="indent(6) slant(italic) indent(5)" would be considered to have been indented by 5.

We provide a list of recommended renditional keywords and values. Because rendition ladders are created by the WWP and are not specified by the TEI schema or any other standard, users may freely invent their own keywords and values. However, it makes sense to use the ones documented here where applicable, to help insure consistency with other projects and to reduce the need for extra documentation.

Examples

Example 1.

In the following example, the element in question is indented by one indent, has an italic slant, and is in all upper case. The indent() keyword thus has an argument of 1, the slant keyword has the argument italic, and the case keyword has the argument allcaps:

<l rend="indent(1) slant(italic) case(allcaps)">