Renditional keywords: pre, post [117]


Use of the pre and post keywords to capture characters printed before or after an element (used as delimiters)


The pre and post keywords in the rendition ladder are used to encode prefixes and postfixes, that is, character strings which immediately precede or follow the content of an element and which are directly associated with the element’s presentation. Delimiters (for instance, quotation marks, brackets, parentheses) are examples of prefixes and postfixes, as for instance:

"Who are you?" she asked.

<q rend="pre(&ldquo;) post(&rdquo;)">Who are you?</q> she asked.

Although it may seem counterintuitive, the post() keyword goes on the start-tag of the element; attribute values are not allowed on the end-tag.

Stage directions, continued verse lines, and features of the title page often include delimiters which should be encoded using pre and post. Also, where the character marking a footnote is repeated preceding the note itself, it should be encoded using the pre keyword. No claim is made as to whether the other renditional qualities of the element in question apply to the delimiters as well.

In general, any delimiters which indicate the boundary of an element (such as ornaments or rules) should be encoded using pre and/or post, except where the delimiters are part of the ordinary sentence punctuation. Thus for instance we would not encode the parentheses in the following example using pre and post:

        I hope (mon dieu!) that you are joking!

Parentheses (which are part of the syntax of the rendition ladder) need to be preceded by a backslash (as an escape character) when they appear as the value of pre or post:

<speaker rend="pre(\()post(\))">

list all entries