Text Encoding Initiative
6. Marking Highlighted Phrases
Highlighted words or phrases are those made visibly different from the rest of the text, typically by a change of type font, handwriting style, or ink color, intended to draw the reader's attention to them.
The global rend attribute can be attached to any element, and used wherever necessary to specify details of the highlighting used for it. For example, a heading rendered in bold might be tagged head rend="bold", and one in italic head rend="italic".
It is not always possible or desirable to interpret the reasons for such changes of rendering in a text. In such cases, the element <hi> may be used to mark a sequence of highlighted text without making any claim as to its status.
<p><hi rend="gothic">And this Indenture further witnesseth</hi> that the said <hi rend="italic">Walter Shandy</hi>, merchant, in consideration of the said intended marriage ...</p>
Alternatively, where the cause for the highlighting can be identified with confidence, a number of other, more specific, elements are available.
Some features (notably quotations and glosses) may be found in a text either marked by highlighting, or with quotation marks. In either case, the elements <q> and <gloss> (as discussed in the following section) should be used. If the rendition is to be recorded, use the global rend attribute.
On the one hand the Nibelungenlied is associated with the new rise of romance of twelfth-century France, the romans d'antiquité;, the romances of Chrétien de Troyes, and the German adaptations of these works by Heinrich van Veldeke, Hartmann von Aue, and Wolfram von Eschenbach.Interpreting the role of the highlighting, the sentence might look like this:
<p>On the one hand the <title>Nibelungenlied</title> is associated with the new rise of romance of twelfth-century France, the <foreign>romans d'antiquité</foreign>, the romances of Chrétien de Troyes, ...</p>Describing only the appearance of the original, it might look like this:
<p>On the one hand the <hi rend="italic">Nibelungenlied</hi> is associated with the new rise of romance of twelfth-century France, the <hi rend="italic">romans d'antiquité</hi>, the romances of Chrétien de Troyes, ...</p>
Like changes of typeface, quotation marks are conventionally used to denote several different features within a text, of which the most frequent is quotation. When possible, we recommend that the underlying feature be tagged, rather than the simple fact that quotation marks appear in the text, using the following elements:
Here is a simple example of a quotation:
<p>Few dictionary makers are likely to forget Dr. Johnson's description of the lexicographer as <q>a harmless drudge.</q></p>
To record how a quotation was printed (for example, in-line or set off as a display or block quotation), the rend attribute should be used. This may also be used to indicate the kind of quotation marks used.
<p><q>Who-e debel you?</q> — he at last said — <q>you no speak-e, damme, I kill-e.</q> And so saying, the lighted tomahawk began flourishing about me in the dark.</p>If it is important to convey the idea that the two <q> elements together reproduce a single speech, the linking attributes next and prev may be used, as described in section 8.3. Linking Attributes.
<q who="Wilson">Spaulding, he came down into the office just this day eight weeks with this very paper in his hand, and he says:—<q who="Spaulding">I wish to the Lord, Mr. Wilson, that I was a red-headed man.</q></q>This example also demonstrates how quotations may be embedded within other quotations: one speaker (Wilson) quotes another speaker (Spaulding).
The creator of the electronic text must decide whether quotation marks are replaced by the tags or whether the tags are added and the quotation marks kept. If the quotation marks are removed from the text, the rend attribute may be used to record the way in which they were rendered in the copy text.
As with highlighting, it is not always possible and may not be considered desirable to interpret the function of quotation marks in a text in this way. In such cases, the tag <hi rend="quoted"> might be used to mark quoted text without making any claim as to its status.
Words or phrases which are not in the main language of the texts may be tagged as such in one of two ways. If the word or phrase is already tagged for some reason, the element indicated should bear a value for the global lang attribute indicating the language used. Where there is no applicable element, the element <foreign> may be used, again using the lang attribute. For example:
<p>John has real <foreign lang="fra">savoir-faire</foreign>.</p>
<p>Have you read <title lang="deu">Die Dreigroschenoper</title>?</p>
<p><mentioned lang="fra">Savoir-faire</mentioned> is French for know-how.</p>
<p>The court issued a writ of <term lang="lat">mandamus</term>.</p>
As these examples show, the <foreign> element should not be used to tag foreign words if some other more specific element such as <title>, <mentioned>, or <term> applies. The global lang attribute may be attached to any element to show that it uses some other language than that of the surrounding text.