A key, preceded by the reserved word id and a colon :, enclosed within two dollar signs $…$. A trailing semicolon ; before the closing dollar sign is allowed and optional.
The key consists exclusively of Latin letters, digits, underscore _, hyphen - and full stop ., and cannot start with a digit. This character set is chosen because:
every valid key is directly a valid xml:id, and so is exported without transformation;
none of the characters coincides with a delimiter of the notation (: ; / # @ = ,), so a key is never ambiguous inside a locus reference.
Mandatory and unique. Every file declares exactly one $id:. Tools that aggregate several files (such as the lexicon builder) reject files without an identifier and files that declare more than one.
Outermost level only. An $id: cannot appear inside other units. By convention it is the first line of the file.
Unique within the project. Two files of the same corpus cannot share a key. Tools report the error, naming the two conflicting files.
Immutable. The key is the target of other texts’ locus references: changing it invalidates them. It should be chosen with care and not derived from data likely to change.
Reserved prefixes. Keys starting with gen-, app-, surface- or region- are reserved, because the same prefixes are used by the EpiDoc export for the identifiers it generates automatically within the document.
xml:id of the <TEI> root element and <idno type="beda"> in publicationStmt. The key is inserted by the document assembler, not by the inscription text.
HTML
On the wrapper element: id="beda-key" and data-beda-id="key". No visible content. Not emitted for inline fragments.
Unicode, Typst
No text produced.
IbiScript
Written back unchanged in formatted and minified source.
Inside a fragment (the ibi macro in EpiDoc) an $id: is not allowed, because the fragment is embedded in a document that already has its own identity.