Renditional keywords: general points on indentation [123]

Abstract

Overview of the encoding of indentation, including absolute and relative indentation, first-line indentation, and negative indentation

Discussion

For all three keywords having to do with indentation, the value for the keyword is a number of tab stops, i.e. the amount of shift relative to the margins of the document as a whole, or to other surrounding elements. The concept of a “tab stop” is an anachronism in this context, but it expresses a unit of indentation which is fairly constant and which is explicitly relative, not absolute (that is, it is not a fixed measurable quantity but a unit which operates within a given text). Thus for lines of poetry, for instance, which are indented, the first increment of indentation should be encoded as “indent(1)”, the next additional increment of indentation should be encoded as “indent(2)”, etc.

An absolute number (that is, a number without a + or - sign) as a value indicates that the element is indented by that much *from the margin*.

A relative number (one modified by a + or -) indicates that the element is indented by that much from the meaningful parent element. “Meaningful parent element” here means the most immediate block-level parent element, i.e. an element which can meaningfully govern indentation. Note that relative indentation indicates indentation from the parent, not the previous sibling.

A value of zero for indent() is always absolute; that is, it indicates that the element is flush at the left margin. A value of plus (or minus :-) zero for indent() is always relative; that is, it indicates that the element is indented the same as its (meaningful)parent.

The first-indent keyword indicates that the first line of the element is shifted by the expressed amount relative to the other lines in the element. A positive value indicates a shift to the right (i.e. indentation), and a negative value indicates a shift to the left (i.e. an overhanging line). An absolute value for first-indent indicates indentation relative to the left margin; a relative value (has “+” or “-”) indicates indentation relative to the rest of the element itself. Since it indicates relative indentation, the first-indent keyword should not be used for elements which only include a single line, since it is meaningless in this context.

The right-indent keyword indicates that the right margin for all lines in the element is shifted to the left by the expressed amount.

A positive indentation will be assumed unless a negative number is specified, so the + sign in the examples above is not strictly necessary. Positive indentation is indentation which shrinks the text block; negative indentation is indentation which expands the text block.

Indentation information is what people often have the most difficulty encoding.

Examples

Example 1.

A typical hanging indent:
<p rend="indent(1)first-indent(-1)">

Example 2. An indented closer to a letter:
[end of last para in a letter] ... to imagine any Person more to any one than I am,
MADAM,
Your Ladiships most faithful Servant,
and passionate Friend,
Orinda.


<p>...to imagine any Person more to any one than I am,</p>
<closer rend="indent(1)">
<salute>Madam,
<lb/>Your Ladiships most faithful Servant,
<lb rend="indent(+1)"/>and passionate Friend,</salute>
<signed rend="indent(+3)><persName>Orinda</persName></signed>
</closer>

Relative indentation has been used here: the closer as a whole is indented by one, and relative to the closer the salute is indented one further increment. The second line of the salute is further indented by one, and the signature is indented relative to the closer by three.

list all entries

search

about

wwp