Adding Entities and Attributes -- an explanation in greater detail:

 

 

  1. Notice that you can put prose explanations near code as long as they are preceded by <!-- and followed by -->. I recommend naming who made additions in the prolog and dating these additions.
  2. You will need to make a file called "figures.ent" that defines all your figures (gifs, tiffs, pngs, and jpgs) as entities. For example, the main document I'm coding has only one picture -- a thumbnail version, that I'm calling "sculptsm" (link: lcview09sm.jpg / if the image is not going to be housed in the same directory as the TEI document, put in the full URL) -- that appears in the document itself, and one to which that thumbnail is linked / called "sculpt" (link: lcview09.jpg -- again, if the image were to be housed elsewhere, this link would be a full URL) -- for those who want to see the full picture. So my "figures.ent" file will look like this: (see section 22.3 of the TEI P4 manual ). Later, when working within the text portion of the TEI document, when you refer to these images within the <figure> tag, you say entity="[name]" -- here, entity="sculpt".
  3. You will also need to make a file called "urls.ent" that lists and defines as entities all external urls to which your document points: URL entities are referred to within <xref> tags as "doc" rather than as "entity": doc="[name]" -- here, doc="lcathedral".
  4. These notations allow for the appearance of gifs, tiffs, pngs, and jpgs in my document.
  5. This code presents as part of the rules the "figures.ent" and "urls.ent" documents that you will make and house in the same directory as your TEI document.
  6. These two additions of attributes allow you make links and import figures using URLs -- that is, to point somewhere outside your document -- in the <xref> and < figure> codes as they appear in the body of your TEI document. If you add these two statements to the prolog, then, in the text portion of your document, whenever you type <xref url="http://www.muohio.edu">Miami</xref>, a link will be generated, or, when you type <figure url="http://www.muohio.edu/miami.jpg"><head>Name of image</head></figure>, an image will be imported with "Name of image" below it.

-- just so you can see how this code makes use of these rules:

Here is what the code will looks like in the body of the TEI document for making an external link:

<p>Chantrey's monument resides at Lichfield Cathedral, and one can see a picture of it at their <xref url="http://www.lichfield-cathedral.org/lcview09.htm" doc="lcathedral">Web site</xref>.</p>

Here is what the code looks like, the code in the body of the document, for importing a figure into it:

<p><figure url="lcview09sm.jpg" entity="sculptsm"><head>Chantrey's Monument at Lichfield Cathedral</head></figure></p>

Back