TEI Best Practices
Jump to navigation
Jump to search
Note: PGTEI is no longer used at DP. Information on this page may be out of date.
Here is the on-going results of the Best Pratices discussion in the forums.
See the final example TEI doc at the end.
Title Page
Two ways to create:
(easy) <divGen type="titlepage" />
(hard) Create a manual title page.
TEI Example Doc
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE TEI.2 SYSTEM "http://www.gutenberg.org/tei/marcello/0.4/dtd/pgtei.dtd">
<TEI.2>
<teiHeader>
<fileDesc>
<titleStmt><title>Bluntman and Chronic</title>
<author>Holden McNeil</author>
<author>Banky Edwards</author>
</titleStmt>
<editionStmt><p></p></editionStmt>
<publicationStmt><p></p></publicationStmt>
<seriesStmt><p></p></seriesStmt>
<sourceDesc><p></p></sourceDesc>
</fileDesc>
<encodingDesc></encodingDesc>
<profileDesc></profileDesc>
</teiHeader>
<text>
<front>
<div>
<divGen type="pgheader" />
</div>
<titlePage rend="text-align: center; page-break-before: right">
<docTitle>
<titlePart type="main" rend="font-size: xx-large">Bluntman and Chronic</titlePart><lb />
<titlePart type="sub" rend="font-size: x-large">(Bonus Points If You Get This Reference)</titlePart>
</docTitle>
<byline rend="margin-top: 5; margin-bottom: 5">By <docAuthor>Holden McNeil</docAuthor> and
<docAuthor>Banky Edwards</docAuthor>
</byline>
<docImprint><name>New York</name><lb />
<name>View Askew Publishers</name><lb />
</docImprint>
<docDate>1997</docDate>
</titlePage>
<div rend="page-break-before: right">
<index index="pdf" />
<head rend="text-align: center">Contents</head>
<divGen type="toc" />
</div>
</front>
<body>
<div rend="page-break-before: right">
<index index="toc" level1="Chapter 1 - Chapters, Sections and Other Major Divisions in a Text" />
<head rend="text-align: center">Chapter 1</head>
<head type="sub" rend="text-align: center">Chapters, Sections and Other Major Divisions in a Text</head>
<p>Instead of using various numbers of blank lines to specify whether something is a chapter break/section/etc., TEI uses
<div></div> markup to mark a section of text as a separate grouping. By nesting these <div> markups,
you can specify sections within chapters within parts ...</p>
<p>Note the "thought-break" below. You can control the way this renders with the rend attribute.</p>
<milestone unit="tb" rend="stars: 5" />
<p>In this case, we used 5 asterisks. You can also specify a blank line (default) or a horizontal rule of n% page
width.</p>
<div>
<index index="toc" />
<head rend="text-align: center">Sub-section to Chapter 1</head>
<p>By nesting this section inside the previous section, it will appear as a subsection of Chapter 1. Theoretically,
this nesting effect could go on into infinity. I think the farthest nesting I've run across in practice is about 4
deep.</p>
</div>
</div>
</body>
<back>
</back>
</text>
</TEI.2>
Results
The HTML results can be viewed here: [1]