Encode Annotations

Rationale

You will encode annotations in a stand-off file that points to anchors in your modern text. If you are familiar with TEI Guidelines, you will recognize this method as the double end-point attachment method.1

Practice: Make the Annotation File

The annotations for the text you are annotating live in a separate file with the file name of emdABBR_M_annotations.xml. Give the @xml:id attribute on the root element a value of "emdABBR_M_annotations". For example, the annotations for emdMV_M.xml are encoded in the emdMV_M_annotations.xml file. In a few cases, editors may choose to prepare multiple modern texts and annotate each one separately. For example, James Mardock prepared a modern text based on the folio text of the play. These files were named emdH5_FM.xml and emdH5_QM.xml. The linked annotation files are namedemdH5_FM_annotations.xml and emdH5_QM_annotations.xml. Note that the name of the annotations file always start with the name of the file being annotated.
The annotations file is saved in the app folder of your edition directory. If the app folder does not already contain an annotations file, you may create an annotations file using the LEMDO template entitled annotations_template. (See Use LEMDO’s Oxygen Templates.) The instructions in the template are designed to supplement this documentation. Please read and follow the comments carefully. If you prefer, a member of the LEMDO team will create the file and add it to the repository for you.
The body of your annotations file will contain a single <div> element. Give this <div> a @type attribute with a value of "annotations".

Place Anchors in the Source Document

An <anchor> is an empty (self-closing) element whose only purpose is to be pointed at from somewhere else. It looks like this:
<anchor xml:id="emdH5_FM_anc_1531"/>
It has an @xml:id attribute which starts with the ID of the text containing it (here emdH5_FM), and then has _anc_ (= this is an anchor) and a number. The number has no significance except to ensure that every anchor in a document has a unique @xml:id attribute. Numbers do not go in sequence through the document; they are assigned in the order that anchors are added, and are created automatically (see below).
A single anchor marks a specific point in the text. However, for annotation you normally need to mark a range of text, with a starting point and a finishing point. This is done simply by using two anchors:
<lg>
<!-- ... -->

  <l>Received the <anchor xml:id="emdH5_FM_anc_1539"/>golden earnest of<anchor xml:id="emdH5_FM_anc_1540"/> our death,</l>
  <!-- ... -->
</lg>
These two anchors delimit the phrase “golden earnest of”, and an annotation can use them to specify that it’s talking about that specific phrase. Since anchors are self-closing elements, they can appear anywhere in the text, and therefore you can annotate a span of text which crosses the normal XML hierarchy if you need to. For example, you can annotate a phrase that begins in the middle of one line and ends in the middle of another.
Creating anchors manually is difficult because you can’t easily know what the next available number for its @xml:id will be. Therefore we use a keyboard shortcut to insert them automatically. To insert anchors in the document you are annotating, identify the string you want to annotate, and select it with your cursor. Once the selection is made, press Ctrl+Shift+A (on Linux or Windows computers) or Cmd+Shift+A (on Mac computers). This shortcut will automatically generate an <anchor> to the left of your selection, and another to the right. Each <anchor> has a generated attribute @xml:id with a unique value, as described above. You will need these anchor IDs when writing your annotation in the annotation file.
For richer documentation on anchors, see Create Anchors.

Things to Avoid

When you insert anchors into the text, bear in mind that they are turned into footnote numbers in the print output. That means you should not place a single anchor or a final anchor anywhere that footnote numbers would be inappropriate or distracting. For example, if you were to place an anchor at the beginning of a <head> element and point to it as a single locus, the result would be the appearance of a footnote number right at the beginning of a heading on the page; that’s distracting and problematic from the point of view of font sizing. LEMDO therefore drops anchors in such locations when we build the PDF, which may result in a missing anchor error. You will therefore want to be strategic (and even creative) if you want to offer a commentary on a heading. Ask the LEMDO team for help.

Create Annotation and Point to Anchors

In the annotations file, all the notes on a single word or string are contained within a parent <note> element with a @type value of "annotation". You also need two attributes on this parent <note> element that refer to the anchors placed in the source document. These attributes are @target and @targetEnd. @target points to the anchor to the left of the string you want to annotate. @targetEnd points to the anchor to the right of the string you want to annotate.
You will have to turn the @xml:id attributes of the anchors into full pointers by specifying the target document. If you have two anchor that look like this—
<lg>
<!-- ... -->

  <l>Received the <anchor xml:id="emdH5_FM_anc_1539"/>golden earnest of<anchor xml:id="emdH5_FM_anc_1540"/> our death,</l>
  <!-- ... -->
</lg>
— you will need to point to them by prepending the prefix doc: plus the document ID plus the hash character, like this:
<note type="annotation" target="doc:emdH5_FM#emdH5_FM_anc_1539" targetEnd="doc:emdH5_FM#emdH5_FM_anc_1540"/>
The value of @target is must point to the left-hand anchor. The value of @targetEnd must point to the right-hand anchor. Please be careful not to reverse the values of your anchors.

Add Notes

Inside the parent <note> element you will have at least two more note elements.
The first child <note> element identifies the label, which is the string of text you want to annotate.2 Add a @type attribute to the <note> , with a value "label". The content of this note is the string to be annotated. If the string is long, you may abbreviate it. Give at least the first and last word in the string, indicating omitted material with the ellipsis character: … (not periods). See Practice: Insert an Ellipsis Character.
Following the <note> with the @type value of "label", you will have at least one sibling <note> element. This note will have a @type attribute with the value "gloss", "commentary", "textual", "lexical", "lineation", or "performance". You may have one or more of such notes (i.e., a gloss and a commentary note; a commentary note and a textual note; a gloss, a textual note, and a performance note; and so on), but you may have only one of each type.
Exception: you may create two versions of a gloss or commentary note, one for print and one for online publication. To disambiguate the two versions, add the @subtype attribute with the value "printOnly" or "onlineOnly":
<note type="label">close</note> <note type="gloss" subtype="printOnly">Private.</note> <note type="gloss" subtype="onlineOnly">Private (<ref type="bibl" target="bibl:OEDT2">
  <title level="m">OED</title>, 2nd ed. <term>close</term>, a.A.4.b</ref>).</note>
Note that "textual", "lexical", "lineation", and "performance" are onlineOnly by default.

Encode Note Contents

Within the <note> element, you may use most of the elements, attributes, and values that are allowed in critical paratexts. The full suite of LEMDO’s linking strategies is also available. Think of your annotations as short critical paratexts and encode the content of your notes as appropriate.
<note type="commentary" subtype="onlineOnly">The Scottish King David II, captured at the battle of Neville’s Cross, 1346, while Edward III was in France. Historically, and in Holinshed (<ref type="bibl" target="bibl:HOLI2">
  <title level="m">Chronicles</title>, 1587</ref>), David II is not sent to France, though he is so in <title level="m">Edward III</title>.</note>

Other Resources

LEMDO YouTube video: Collation (Technical): Linking
LEMDO YouTube video: Annotations (Editorial)
LEMDO YouTube video: Annotations (Technical)

Notes

1.See TEI Guidelines 13.2.2 for more information about the double end-point attachment method.
2.You might hear this string called the lemma. Strictly speaking, the term lemma is reserved for the collation.

Prosopography

Illya

Illya has a BA in English and Sociocultural Anthropology and an MA in English. Prior to joining the HCMC, he was a PhD candidate in English and Book History at the University of Toronto and worked on Records of Early English Drama and on the Modernist Archives Publishing Project. His work at the HCMC focuses on creating web-based applications for research projects led by members of the faculty of Humanities at the University of Victoria. This involves creating schemas for new and existing datasets, writing XSLT and build files to transform datasets into structured TEI and HTML formats, implementing staticSearch, and ensuring that new projects are Endings Principles compliant.

Janelle Jenstad

Janelle Jenstad is a Professor of English at the University of Victoria, Director of The Map of Early Modern London, and Director of Linked Early Modern Drama Online. With Jennifer Roberts-Smith and Mark Beatrice Kaethler, she co-edited Shakespeare’s Language in Digital Media: Old Words, New Tools (Routledge). She has edited John Stow’s A Survey of London (1598 text) for MoEML and is currently editing The Merchant of Venice (with Stephen Wittek) and Heywood’s 2 If You Know Not Me You Know Nobody for DRE. Her articles have appeared in Digital Humanities Quarterly, Elizabethan Theatre, Early Modern Literary Studies, Shakespeare Bulletin, Renaissance and Reformation, and The Journal of Medieval and Early Modern Studies. She contributed chapters to Approaches to Teaching Othello (MLA); Teaching Early Modern Literature from the Archives (MLA); Institutional Culture in Early Modern England (Brill); Shakespeare, Language, and the Stage (Arden); Performing Maternity in Early Modern England (Ashgate); New Directions in the Geohumanities (Routledge); Early Modern Studies and the Digital Turn (Iter); Placing Names: Enriching and Integrating Gazetteers (Indiana); Making Things and Drawing Boundaries (Minnesota); Rethinking Shakespeare Source Study: Audiences, Authors, and Digital Technologies (Routledge); and Civic Performance: Pageantry and Entertainments in Early Modern London (Routledge). For more details, see janellejenstad.com.

Joey Takeda

Joey Takeda is LEMDO’s Consulting Programmer and Designer, a role he assumed in 2020 after three years as the Lead Developer on LEMDO.

Mahayla Galliford

Project manager, 2025-present; research assistant, 2021-present. Mahayla Galliford (she/her) graduated with a BA (Hons with distinction) from the University of Victoria in 2024. Mahayla’s undergraduate research explored early modern stage directions and civic water pageantry. Mahayla continues her studies through UVic’s English MA program and her SSHRC-funded thesis project focuses on editing and encoding girls’ manuscripts, specifically Lady Rachel Fane’s dramatic entertainments, in collaboration with LEMDO.

Martin Holmes

Martin Holmes has worked as a developer in the UVic’s Humanities Computing and Media Centre for over two decades, and has been involved with dozens of Digital Humanities projects. He has served on the TEI Technical Council and as Managing Editor of the Journal of the TEI. He took over from Joey Takeda as lead developer on LEMDO in 2020. He is a collaborator on the SSHRC Partnership Grant led by Janelle Jenstad.

Navarra Houldin

Training and Documentation Lead 2025–present. LEMDO project manager 2022–2025. Textual remediator 2021–present. Navarra Houldin (they/them) completed their BA with a major in history and minor in Spanish at the University of Victoria in 2022. Their primary research was on gender and sexuality in early modern Europe and Latin America. They are continuing their education through an MA program in Gender and Social Justice Studies at the University of Alberta where they will specialize in Digital Humanities.

Rylyn Christensen

Rylyn Christensen is an English major at the University of Victoria.

Samuel Seaberg

Samuel Seaberg, a University of Victoria English undergrad, enjoys riding his bike. During the summer of 2025, he began working with LEMDO as a recipient of the Valerie Kuehne Undergraduate Research Award (VKURA). Unfortunately, due to his summer being spent primarily in working to establish an edition of Thomas Heywood’s If You Know Not Me, You Know Nobody, Part 2 and consequently working out how to represent multi-text works in a digital space, his bike has suffered severely of sheltered seclusion from the sun. Note: Samuel now works for LEMDO as the Assistant Project Manager, much to his bike’s chagrin.

Tracey El Hajj

Junior Programmer 2019–2020. Research Associate 2020–2021. Tracey received her PhD from the Department of English at the University of Victoria in the field of Science and Technology Studies. Her research focuses on the algorhythmics of networked communications. She was a 2019–2020 President’s Fellow in Research-Enriched Teaching at UVic, where she taught an advanced course on Artificial Intelligence and Everyday Life. Tracey was also a member of the Map of Early Modern London team, between 2018 and 2021. Between 2020 and 2021, she was a fellow in residence at the Praxis Studio for Comparative Media Studies, where she investigated the relationships between artificial intelligence, creativity, health, and justice. As of July 2021, Tracey has moved into the alt-ac world for a term position, while also teaching in the English Department at the University of Victoria.

Bibliography

Holinshed, Raphael. Chronicles of England, Scotlande, and Irelande. Vol. 3. London, 1587. STC 13569. ESTC S122178.
OED: The Oxford English Dictionary. 2nd ed. Oxford University Press, 1989.

Orgography

LEMDO Team (LEMD1)

The LEMDO Team is based at the University of Victoria and normally comprises the project director, the lead developer, project manager, junior developers(s), remediators, encoders, and remediating editors.

Metadata