<TEI xmlns="http://www.tei-c.org/ns/1.0">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title type="main">TEI by Example</title>
        <title type="sub">Module 1: Common Structure, Elements, and Attributes</title>
        <author xml:id="EV">Edward Vanhoutte</author>
        <author xml:id="RvdB">Ron Van den Branden</author>
        <editor xml:id="MT">Melissa Terras</editor>
        <sponsor>Association for Literary and Linguistic Computing (ALLC)</sponsor>
        <sponsor>Centre for Data, Culture and Society, University of Edinburgh, UK</sponsor> 
        <sponsor>Centre for Digital Humanities (CDH), University College London, UK</sponsor>
        <sponsor>Centre for Computing in the Humanities (CCH), King’s College London, UK</sponsor>
        <sponsor>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</sponsor>
        <funder>
          <address>
            <addrLine>Centre for Scholarly Editing and Document Studies (CTB)</addrLine>
            <addrLine>Royal Academy of Dutch Language and Literature</addrLine>
            <addrLine>Koningstraat 18</addrLine>
            <addrLine>9000 Gent</addrLine>
            <addrLine>Belgium</addrLine>
          </address>
          <email>ctb@kantl.be</email>
        </funder>
        <principal>Edward Vanhoutte</principal>
        <principal>Melissa Terras</principal>
      </titleStmt>
      <publicationStmt>
        <publisher>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</publisher>
        <distributor>Centre for Scholarly Editing and Document Studies (CTB) , Royal Academy of Dutch Language and Literature, Belgium</distributor>
        <pubPlace>Gent</pubPlace>
        <address>
          <addrLine>Centre for Scholarly Editing and Document Studies (CTB)</addrLine>
          <addrLine>Royal Academy of Dutch Language and Literature</addrLine>
          <addrLine>Koningstraat 18</addrLine>
          <addrLine>9000 Gent</addrLine>
          <addrLine>Belgium</addrLine>
        </address>
        <availability status="free">
          <p>Licensed under a <ref target="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution ShareAlike 3.0 License</ref>
                    </p>
        </availability>
        <date when="2010-07-09">9 July 2010</date>
      </publicationStmt>
      <seriesStmt>
        <title>TEI by Example.</title>
        <respStmt>
          <name>Edward Vanhoutte</name>
          <resp>editor</resp>
        </respStmt>
        <respStmt>
          <name>Ron Van den Branden</name>
          <resp>editor</resp>
        </respStmt>
        <respStmt>
          <name>Melissa Terras</name>
          <resp>editor</resp>
        </respStmt>
      </seriesStmt>
      <sourceDesc>
        <p>Digitally born</p>
      </sourceDesc>
    </fileDesc>
    <encodingDesc>
      <projectDesc>
        <p>TEI by Example offers a series of freely available online tutorials walking individuals through the different stages in marking up a document in TEI (Text Encoding Initiative). Besides a general introduction to text encoding, step-by-step tutorial modules provide example-based introductions to eight different aspects of electronic text markup for the humanities. Each tutorial module is accompanied with a dedicated examples section, illustrating actual TEI encoding practise with real-life examples. The theory of the tutorial modules can be tested in interactive tests and exercises.</p>
      </projectDesc>
    </encodingDesc>
    <profileDesc>
      <langUsage>
        <language ident="en-GB">en-GB</language>
      </langUsage>
    </profileDesc>
    <revisionDesc>
      <change when="2020-06-22" who="#RvdB">technical revision</change>
      <change when="2010-07-13" who="#RvdB">
                <list>
                    <item>added distinction <gi>gi</gi> — <tag>gi scheme="..."</tag> — <gi>tag</gi>
                    </item>
        <item>final spellcheck</item>
                </list>
            </change>
      <change when="2010-07-09" who="#RvdB">release</change>
      <change when="2009-11-20" who="#EV">general contents completed</change>
      <change when="2009-11-13" who="#EV">intermediate update</change>
      <change when="2009-11-12" who="#EV">intermediate update</change>
      <change when="2009-11-05" who="#EV">intermediate update</change>
      <change when="2009-10-30" who="#EV">intermediate update</change>
      <change when="2009-10-28" who="#EV">intermediate update</change>
      <change when="2009-06-10" who="#EV">Authoring</change>
    </revisionDesc>
  </teiHeader>
  <text xml:id="TBED01v00" type="tutorials">
    <body>
            <div xml:id="nontextual">
        <head>Non-Textual Phenomena</head>
        <p>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.</p>
        <p>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 <gi>graphic</gi>. Typically, a <att>url</att> 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.
          <figure xml:id="example38">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <p>'Plenty of options', he thought, sat on a bench and opened the book he had taken from the Whoopledywhaaian National Library. <graphic url="http://www.whoopledywhaa.info/library/facade.png"/> It was titled 'While thou art here', by Sir Edmund Peckwood. <graphic url="wtatcover.jpg"/> While reading the first sentence, his placid expression turned to a certain je ne sais quoi: 'For the first time in twenty-five years, Dr Burt Diddledygook decided not to turn up to the annual meeting of the Royal Academy of Whoopledywhaa.</p>
            </egXML>
            <head type="legend">Encoding an image with <gi>graphic</gi>.</head>
          </figure>
        </p>
        <p>Alternatively, encoded binary data representing an inline graphic or image may be embedded directly within the document. In this case, the <gi>binaryObject</gi> element may be used to represent an encoded version of its binary data.</p>
        <p>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 <gi>head</gi>. More extensive comments or discussions on the figure or graphic may be given inside one or more <gi>p</gi> or <gi>ab</gi> elements. Both the graphic or figure (<gi>graphic</gi> or <gi>binaryObject</gi>), associated text(s) (<gi>head</gi>, <gi>p</gi> or <gi>ab</gi>), and descriptions of the image (<gi>figDesc</gi>) are grouped in a wrapping <gi>figure</gi> element:
          <figure xml:id="example39">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <figure>
                <graphic url="http://www.whoopledywhaa.info/library/facade.png"/>
                <head>The National Library of Whoopledywhaa.</head>
              </figure>
              <figure>
                <graphic url="wtatcover.jpg"/>
                <head>Figure 2. The cover of the first print edition of "While thou art here" by Sir Edmund Peckwood from the rare books collection of the National Library of Whoopledywhaa.</head>
              </figure>
            </egXML>
            <head type="legend">Grouping information related to a graphical element inside <gi>figure</gi>.</head>
          </figure>
        </p>
        <note type="summary">The <gi>figure</gi> element is used to contain images, captions, and textual descriptions of the pictures. The images themselves are specified using the <gi>graphic</gi> element, whose <att>url</att> attribute provides the location of an image and whose optional <att>n</att> and <att>xml:id</att> attributes provide opportunities for numbering and identification.</note>
        <p>Figures consisting of several figures or sub-figures can be encoded with nesting <gi>figure</gi> elements:
          <figure xml:id="example40">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <figure n="2">
                <figure n="2a">
                  <graphic url="wtatcoverfront.jpg"/>
                  <head>Front</head>
                </figure>
                <figure n="2b">
                  <graphic url="wtatcoverback.jpg"/>
                  <head>Back</head>
                </figure>
                <head>Figure 2. Front and back cover of the first print edition of "While thou art here" by Sir Edmund Peckwood from the rare books collection of the National Library of Whoopledywhaa.</head>
              </figure>
            </egXML>
            <head type="legend">Encoding composite figures with nesting <gi>figure</gi> elements.</head>
          </figure>
        </p>
        <p>Note, how in the previous example the different nesting figures are numbered in an <att>n</att> attribute. This is one of the global attributes available to all TEI elements. For a discussion of this and other global attributes, see <ptr type="crossref" target="#globalattributes"/>.</p>
        <p>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 <gi>figDesc</gi> element:
          <figure xml:id="example41">
            <egXML xmlns="http://www.tei-c.org/ns/Examples">
              <figure>
                <graphic url="http://www.whoopledywhaa.info/library/facade.png"/>
                <head>The National Library of Whoopledywhaa.</head>
                <figDesc>The figure shows the front of the National Library of Whoopledywhaa with the two typical towers in the so called Whooply-Gothic style. The towers are 145 metres high and the facade of the building is 48 metres wide. The 16 windows in the front are made of recycled stained glass windows of the nearby Saint-Morkel's church which now serves as a swimming pool.</figDesc>
              </figure>
            </egXML>
            <head type="legend">Providing an editorial description of a graphic element with <gi>figDesc</gi>.</head>
          </figure>
        </p>
        <note type="reference">For more information on the treatment of non-textual phenomena in TEI, see <ptr type="crossref" target="TBED03v00.htm#figures"/>, and chapter <ref target="https://tei-c.org/release/doc/tei-p5-doc/en/html/FT.html">14 Tables, Formulæ, and Graphics</ref> of the TEI Guidelines.</note>
      </div>
        </body>
  </text>
  <!-- 
        $Date: 2020-07-08 02:33:20 +0200 (Wed, 08 Jul 2020) $
        $Id: TBED01v00.xml 425 2020-07-08 00:33:20Z ron.vandenbranden $  -->
</TEI>