Encoding tables of contents
Posted by mholmes on 26 Jan 2011 in Activity log
The two latest texts have long and detailed tables of contents which need to be encoded. This is the recommended approach, which I've based on the Brown Women Writers Project guidelines, but which use examples from our own texts.
- The TOC as a whole is encoded as
<div type="contents">
. - The main heading for the whole TOC is encoded as a
<head>
element. - The TOC may then be divided into several sections (as in Le Bon Mariage), or it may be a single section (as in the case of the Ville-Thierry text). Each section should be encoded as a
<list type="toc">
. - If a section of the table has its own subheader (as in the case of Le Bon Mariage), this should be included in a
<head>
tag inside the<list>
tag. - Each item in the TOC will be an
<item>
element inside the<list>
element. - Each item may contain three elements:
<label>
(containing a label such as "Chap. XXXII" in the Ville-Thierry, if there is one).<rs>
("referring string"), which contains the chapter title, heading or description.<ref type="pageNum">
, containing the page number. This will have two other attributes:target="p_1"
(which points, in this example, to page 1 of the text). It is important that you later ensure that an element with the xml:id "p_1" exists in the document; normally this would be the<fw type="pageNum">
1</fw>
-- in other words, the<fw>
tag which contains the page number "1".rend="float:right"
. This designates that the page number appears on the right of the page, which is normally the case.
Here are some example encodings. This is from Le Bon Mariage:
<div type="contents"> <head> <figure><figDesc>Motif décoratif</figDesc></figure> <hi>TABLE</hi><lb/> <hi>DES CHAPITRES</hi><lb/> <hi>CONTENVS EN CE LIVRE</hi><lb/> </head> <list type="toc"> <head> <figure><figDesc>Ligne droite ray/e</figDesc></figure> <hi>LIVRE PREMIER.</hi><lb/> <hi>TRAITE PREMIER.</hi><lb/> <hi>De l'excellence & des fins du Mariage</hi><lb/> </head> <item> <rs>Des trois diverſes eſtats qui ſe retrouuent en l'Egliſe, page </rs> <ref type="pagenum" target="#p_1" rend="float: right;">1</ref> </item> <item> <rs>Combien le mariage eſt honorable. </rs> <ref type="pagenum" target="#p_6" rend="float: right;">6</ref> </item> <item> <rs>Qu'au mariage & en toutes autres actions ſe ſaut propoſer vne bonne fin.</rs> <ref type="pagenum" target="#p_10" rend="float: right;">10</ref> </item> </list> </div>
This example comes from the Ville-Thierry:
<div type="contents"> <head> <figure> <figDesc>Motif décoratif</figDesc> </figure> <hi>TABLE</hi><lb/> <hi>DES CHAPITRES.</hi><lb/> <figure><figDesc>Ligne droite foncée</figDesc></figure> <hi>CHAPITRE PREMIER.</hi><lb/></head> <list type="toc"> <item> <rs>De la grandeur & de l'excellence du Mariage. pag.</rs> <ref target="#p_1">1</ref> </item> <item> <label>Chap. II.</label> <rs>Qu'il n'y a rien de plus mal- heureux que l'état de ceux qui entrent mal dans le Mariage , & qui ne s'y con- duisent pas par les regles de la charité & de la pieté chrétienne.</rs> <ref target="#p_19">19</ref> </item> <item> <label>Chap. III.</label> <rs>Quelles sont les fins que les Chrétiens doivent se proposer , lorsqu'ils s'engagent dans le Mariage.</rs> <ref target="#p_26">26</ref></item> </list> </div>
This entry was posted by Martin and filed under Activity log.