Module 1: Common Structure, Elements, and Attributes
4. Non-Textual Phenomena #
Textual documents often include non-textual phenomena such as images and graphics (illustrations, diagrams, drawings, artwork, ...). These non-textual phenomena serve different purposes: some are an integral part of the text, e.g., in comic books and graphic novels, others just function as illustrations to the text; some are essential for a good understanding of the text, others add very little to that text. The decision how to encode these non-textual materials is once more up to the encoder and the encoding policy in force.
From a structural point of view, images and graphics may be anchored to a particular point in the text. This inline location can be indicated by using the empty element <graphic>. Typically, a @url attribute will reference a digital representation of the image. This can be a local path or a reference to an online image or graphical file.
Alternatively, encoded binary data representing an inline graphic or image may be embedded directly within the document. In this case, the <binaryObject> element may be used to represent an encoded version of its binary data.
An image or a graphic will often be accompanied by associated text such as a caption, a label, or a heading which may be encoded using <head>. More extensive comments or discussions on the figure or graphic may be given inside one or more <p> or <ab> elements. Both the graphic or figure (<graphic> or <binaryObject>), associated text(s) (<head>, <p> or <ab>), and descriptions of the image (<figDesc>) are grouped in a wrapping <figure> element:
Summary
The <figure> element is used to contain images, captions, and textual descriptions of the pictures. The images themselves are specified using the <graphic> element, whose @url attribute provides the location of an image and whose optional @n and @xml:id attributes provide opportunities for numbering and identification.Figures consisting of several figures or sub-figures can be encoded with nesting <figure> elements:
Note, how in the previous example the different nesting figures are numbered in an @n attribute. This is one of the global attributes available to all TEI elements. For a discussion of this and other global attributes, see section 5.
For the purpose of reading devices that cannot represent images, e.g., reading software for the visually impaired, a description of the figure or graphic may be supplied by the editor of the electronic text in a <figDesc> element: