Renditional keywords: indent [223]

Abstract

Specifics on the use of the indent keyword to encode indentation (absolute and relative)

Discussion

The indent keyword indicates that the left margin for all lines in the element is shifted to the right by the expressed amount, unless overridden by the first-indent keyword value. In an element with only one line, indentation should be expressed with this keyword, not with first-indent.

An absolute number for indent() (that is, a number without a + or - sign) as a value indicates that the element is indented by that much *from the left 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.

A positive indentation will be assumed unless a negative number is specified. 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