13. Figures and Tables

Apart from music and text, musical documents, both historical and contemporary, may also contain material in graphical or tabular format. In such materials, details of layout and presentation may also be of comparatively greater significance or complexity than they are for running text. Although some types of graphical material can be represented directly with markup, it is more common practice to include such information by using a reference to an external entity (typically a URL) encoded in a suitable graphical format.

The module defined by this chapter defines special purpose ‘container’ elements that can be used to encapsulate occurrences of such data within an MEI-conformant document in a portable way. Specific recommendations for the encoding of figures, figure descriptions and graphics as well as tables with their sub-elements tr, td and th are provided at the beginnig of this chapter. As there exists a wide variety of different graphic formats, a short list of formats that are widely used at the present time, is given in section Images. Each one includes a very brief description. The chapter closes with attribute and model classes which are defined by the module.

The module described in this chapter makes available the following components:

13.1. Figures

The fig element groups elements representing or containing graphic information such as an illustration or figure. This element is modelled on the figure element in the Text Encoding Initiative (TEI). The fig element is used to contain images, captions, and textual descriptions of the pictures. The images themselves are specified using the graphic element, whose @target attribute provides the location of an image. For example:

<fig>
   <graphic target="../samples/snippets/mei2012-30shortexamples/beam-grace/grace-300.png"></graphic>
</fig>

The graphic element may occur multiple times within the markup of the figure in order to indicate the availablity of different image formats or resolutions:

<fig>
   <graphic target="../samples/snippets/mei2012-30shortexamples/beam-grace/grace-72.png"></graphic>
   <graphic target="../samples/snippets/mei2012-30shortexamples/beam-grace/grace-300.png"></graphic>
   <graphic target="../samples/snippets/mei2012-30shortexamples/beam-grace/grace-600.png"></graphic>
</fig>

13.1.1. Figure Captions and Descriptions

The element caption may be used to transcribe (or supply) a title or descriptive heading for the graphic itself, as in the following example:

<fig>
   <caption>Grace notes</caption>
   <graphic target="../samples/snippets/mei2012-30shortexamples/beam-grace/grace-300.png"></graphic>
</fig>

The figure description ( figDesc) element usually contains a brief prose description of the appearance or content of a graphic figure, for use when documenting an image, perhaps without displaying it. This element is intended for use as an alternative to the content of its parent fig element; for example, for display when the equipment in use cannot display graphic images. It may also be used for indexing or documentary purposes, in which case best practice suggests the use of controlled vocabulary terms.

<fig>
   <graphic target="emblem1.png"></graphic>
   <caption>Emblemi d'Amore</caption>
   <figDesc>A pair of naked winged cupids, each holding a flaming torch, in a rural setting.</figDesc>
</fig>

Occasionally, a figure description may have a complex structure. In this case, one or more textual component elements ( p [paragraph], table, list, quote, or lg [linegroup]) may be used to model the internal structure of the description:

<fig>
   <caption>Grace notes</caption>
   <figDesc>
      <p>The example shows grace notes within beams ...</p>
      <p>This illustration was created by ...</p>
   </figDesc>
   <graphic target="../samples/snippets/mei2012-30shortexamples/beam-grace/grace-300.png"></graphic>
</fig>

13.1.2. Images

The graphic element indicates the location of an inline graphic, illustration, or figure. As noted above, there exists a wide variety of different graphics formats, and the following list is in no way exhaustive. Moreover, inclusion of any format in this list should not be taken as indicating endorsement by the MEI of this format or any products associated with it. Some of the formats listed here are proprietary to a greater or lesser extent and cannot therefore be regarded as standards in any meaningful sense. They are, however, widely used by many different vendors. The following formats are widely used at the present time, and are likely to remain supported by more than one vendor’s software:

  • BMP: Microsoft bitmap format
  • CGM: Computer Graphics Metafile
  • GIF: Graphics Interchange Format
  • JPEG: Joint Photographic Expert Group
  • PBM: Portable Bit Map
  • PCX: IBM PC raster format
  • PICT: Macintosh drawing format
  • PNG: Portable Network Graphics format
  • Photo-CD: Kodak Photo Compact Disk format
  • QuickTime: Apple real-time image system
  • SMIL: Synchronized Multimedia Integration Language format
  • SVG: Scalable Vector Graphics format
  • TIFF: Tagged Image File Format

Brief descriptions of all the above are given below. Where possible, current addresses or other contact information are shown for the originator of each format. Many formal standards, especially those promulgated by the ISO and many related national organizations (ANSI, DIN, BSI, and many more), are available from those national organizations. Addresses may be found in any standard organizational directory for the country in question.

13.1.2.1. Vector Graphic Formats

CGM: Computer Graphics Metafile: This vector graphics format is specified by an ISO standard, ISO 8632:1987, amended in 1990. It defines binary, character, and plain-text encodings; the non-binary forms are safer for blind interchange, especially over networks. Documentation is available from ISO and from its member national bodies, such as AFNOR, ANSI, BSI, DIN, JIS, etc.

SVG: Scalable Vector Graphics format: SVG is a language for describing two-dimensional vector and mixed vector or raster graphics in XML. It is defined by the Scalable Vector Graphics (SVG) 1.0 Specification, W3C Recommendation, 04 September 2001, available at http://www.w3.org/TR/2001/REC-SVG-20010904/.

PICT: Macintosh drawing format: This format is universally supported on Macintosh (tm) systems, and readable by a limited range of software for other systems. Documentation is available from Apple Computer, Cupertino, California USA.

13.1.2.2. Raster Graphic Formats

PNG: Portable Network Graphics format: PNG is a non-proprietary raster format currently widely available. It provides an extensible file format for the losslessly compressed storage of raster images. Indexed-color, grayscale, and true-color images are supported, plus an optional alpha channel. Sample depths range from 1 to 16 bits. It is defined by IETF RFC 2083, March 1997.

TIFF: Tagged Image File Format: Currently the most widely supported raster image format, especially for black and white images, TIFF is also one of the few formats commonly supported on more than one operating system. The drawback to TIFF is that it actually is a wrapper for several formats, and some TIFF-supporting software does not support all variants. TIFF files may use LZW, CCITT Group 4, or PackBits compression methods, or may use no compression at all. Also, TIFF files may be monochrome, greyscale, or polychromatic. All such options should be specified in prose at the end of the encodingDesc section of the MEI header for any document including TIFF images. TIFF is owned by Aldus Corporation. Documentation on TIFF is available from the owner at Craigcook Castle, Craigcook Road, Edinburgh EH4 3UH, Scotland, or 411 First Avenue South, Seattle, Washington 98104 USA.

GIF: Graphics Interchange Format: Raster images are widely available in this form, which was created by CompuServe Information Services, but has by now been implemented for many other systems as well. Documentation is copyright by, and is available from, CompuServe Incorporated, Graphics Technology Department, 5000 Arlington Center Boulevard, Columbus, Ohio 43220 USA.

PBM: Portable Bit Map: PBM files are easy to process, eschewing all compression in favor of transparency of file format. PBM files can, of course, be compressed by generic file-compression tools for storage and transfer. Public domain software exists which will convert many other formats to and from PBM. Documentation of PBM is copyright by Jeff Poskanzer, and is available widely on the Internet.

PCX: IBM PC raster format: This format is used by most IBM PC paint programs, and supports both monochrome and polychromatic images. Documentation is available from ZSoft Corporation, Technical Support Department, ATTN: Technical Reference Manual, 450 Franklin Rd. Suite 100, Marietta, GA 30067 USA.

BMP: Microsoft bitmap format: This format is the standard raster format for computer using Microsoft Windows (tm) or Presentation Manager (tm). Documentation is available from Microsoft Corporation.

13.1.2.3. Photographic and Motion Video Formats

JPEG: Joint Photographic Experts Group: This format is sponsored by CCITT and by ISO. It is ISO/IEC Draft International Standard 10918-1, and CCITT T.81. It handles monochrome and polychromatic images with a variety of compression techniques. JPEG per se, like CCITT Group IV, must beencapsulated before transmission; this can be done via TIFF, or via the JPEG File Interchange Format (JFIF), as commonly done for Internet delivery.

Photo-CD: Kodak Photo Compact Disk format: This format was introduced by Kodak for rasterizing photographs and storing them on CD-ROMs (about one hundred 35mm file images fit on one disk), for display on televisions or CD-I systems. Information on Photo-CD is available from Kodak Limited, Research and Development, Headstone Drive, Harrow, Middlesex HA1 4TY, UK.

13.2. Tables

The element table contains text displayed in tabular form, i.e., in rows and columns. A table is the least ‘graphic’ of the elements discussed in this chapter. Almost any text structure can be presented as a series of rows and columns: one might, for example, choose to show a glossary or other form of list in tabular form, without necessarily regarding it as a table. When tabular presentation is regarded as of less intrinsic importance, it is correspondingly simpler to encode descriptive or functional information about the contents of the table, for example to identify one cell as containing a name and another as containig a date, though the two methods may be combined.

The table element may appear both within other components (such as paragraphs), or between them, provided that the module defined in this chapter has been enabled. It is to a large extent arbitrary whether a table should be regarded as a series of rows or as a series of columns. For compatibility with currently available systems, however, these Guidelines require a row-by-row description of a table.

While rows and columns are always encoded in top-to-bottom, left-to-right order, formatting properties such as those provided by CSS may be used to specify that they should be displayed differently.

13.2.1. Rows

The tr (table row) element is a formatting element that contains one or more td or th elements (cells) in a table. A cell is the intersection of a row and a column. The precise rendition of the table and its cells should be specified in a style steet.

<table>
   <tr>
      <th colspan="7">Besetzungen der Triosonate und ihrer Nachfolger</th>
   </tr>
   <tr>
      <td></td>
      <td>Triosonate
         <lb></lb>Standardbes.
      </td>
      <td>Triosonate für
         <lb></lb>Orgel (Bach)
      </td>
      <td>Sonate mit obl.
         <lb></lb>Cembalo (Bach)
      </td>
      <td>Klaviertrio</td>
      <td>Streichquartett</td>
      <td>Streichtrio</td>
   </tr>
   <tr>
      <td>1. Oberstimme</td>
      <td>1. Violine</td>
      <td>Orgel r.H.</td>
      <td>Violine
         <lb></lb>(Flöte, Gambe)
      </td>
      <td>Violine</td>
      <td>1. Violine</td>
      <td>1. Violine</td>
   </tr>
   <tr>
      <td>2. Oberstimme</td>
      <td>2. Violine</td>
      <td>Orgel l.H.</td>
      <td>Cembalo r.H.</td>
      <td>Klavier r.H.</td>
      <td>2. Violine</td>
      <td></td>
   </tr>
   <tr>
      <td>harmonische Füllung</td>
      <td>Cembalo r.H.</td>
      <td></td>
      <td></td>
      <td></td>
      <td>Bratsche</td>
      <td>Bratsche</td>
   </tr>
   <tr>
      <td>Bass-Stimme</td>
      <td>Cello</td>
      <td>Orgel Pedal</td>
      <td>Cello</td>
      <td>Cello</td>
      <td>Cello</td>
      <td>Cello</td>
   </tr>
</table>

13.2.2. Cells

The td (table data) element designates a table cell that contains data as opposed to a cell that contains column or row heading information. The @colspan and @rowspan attributes provide tabular rendering information. They indicate that a particular cell or row of a table spans more than one row or column.

<table>
   <tr>
      <td colspan="2" rowspan="2">unmittelbares Schlagen</td>
      <td colspan="2" rowspan="2">mittelbares Schlagen</td>
   </tr>
   <tr>
      <td>Gegenschlag</td>
      <td>Aufschlag</td>
      <td>Schütteln</td>
      <td>Schrapen</td>
   </tr>
   <tr>
      <td>1. Stäbe</td>
      <td>1. Stäbe</td>
      <td>1. Rahmen</td>
      <td>1. Raspeln</td>
   </tr>
   <tr>
      <td>2. Platten</td>
      <td>2. Röhren</td>
      <td>2. Gefäße</td>
      <td>2. Räder</td>
   </tr>
   <tr>
      <td></td>
      <td>3. Platten</td>
      <td>3. Reihen</td>
      <td></td>
   </tr>
   <tr>
      <td></td>
      <td>4. Gefäße</td>
      <td></td>
      <td></td>
   </tr>
</table>

The th (table header) element designates a table cell containing column or row heading information as opposed to one containing data. The @colspan and @rowspan attributes tabular display rendering information. They indicate that a particular cell or row of a table spans more than one row or column.

<table>
   <tr>
      <th colspan="4">Systematische Einteilung der Idiophone</th>
   </tr>
   <tr>
      <td colspan="2">unmittelbares Schlagen</td>
      <td colspan="2">mittelbares Schlagen</td>
   </tr>
   <tr>
      <td>Gegenschlag</td>
      <td>Aufschlag</td>
      <td>Schütteln</td>
      <td>Schrapen</td>
   </tr>
   <tr>
      <td>1. Stäbe</td>
      <td>1. Stäbe</td>
      <td>1. Rahmen</td>
      <td>1. Raspeln</td>
   </tr>
   <tr>
      <td>2. Platten</td>
      <td>2. Röhren</td>
      <td>2. Gefäße</td>
      <td>2. Räder</td>
   </tr>
   <tr>
      <td></td>
      <td>3. Platten</td>
      <td>3. Reihen</td>
      <td></td>
   </tr>
   <tr>
      <td></td>
      <td>4. Gefäße</td>
      <td></td>
      <td></td>
   </tr>
</table>