LEAF-Writer Commons
This page walks you through the essentials of working in LEAF-Writer: opening a document, choosing an editor mode, navigating the workspace, adding markup, and saving and exporting your work. It assumes you know what LEAF-Writer is and why you'd use it. For guided practice, see the LEAF-Writer Basics Step-by-Step Tutorial.
What do you need?
- A computer with internet access. LEAF-Writer runs in all major browsers; no installation is required. (It is not currently optimized for phones or tablets.)
- A GitHub account (optional but recommended). You can use LEAF-Writer without registering for anything: open files from your device, encode them, and download the results. To take full advantage of LEAF-Writer — especially opening, saving, and collaborating on documents in the cloud — sign in with a GitHub account.
Privacy
When you first access LEAF-Writer, a cookie notification banner asks you to set your privacy preferences. You can accept all cookies, some, or none:
- Strictly necessary cookies cannot be disabled; the site cannot function without them.
- Functionality cookies can be disabled, but doing so limits what LEAF-Writer can do. If you reject all optional cookies, you can still work locally (uploading from and downloading to your device) but cannot access or share documents on GitHub.
- Anonymized measurement cookies, which collect information about site activity, can also be disabled.
You can review the full Privacy Policy and change your preferences at any time via the identity button at the top right of the screen. Note: save your work before changing cookie preferences, or you will lose unsaved annotation and tagging work.
Open a document
Go to leaf-writer.leaf-vre.org and set your privacy preferences when prompted. If you plan to work with documents in the cloud, sign in with GitHub — you'll know you're signed in when your GitHub avatar appears at the top right.
From the opening screen you can start in any of four ways:
- From your device. Click From Your Device and drag and drop (or click to upload) an XML file from your computer.
- From the cloud. Once signed in to GitHub, the From the Cloud option lets you navigate your own repositories and those you have access to, and search for public LEAF-Writer–enabled documents and repositories.
- Paste XML. Paste a complete XML document directly into the box provided and it will open in the editor.
- From a template or sample. Start from one of four genre-specific templates — Blank, Letter, Poem, or Prose — or experiment with one of the pre-loaded training documents. Templates come with placeholder text: right-click a tag and choose Remove Content Only to clear the text while keeping the tag, or Remove All to delete both.
You can also import and auto-transform a document via the file menu (currently supporting output from the Transkribus HTR engine).
Compatibility: whichever route you choose, the document must be well-formed XML that references a schema LEAF-Writer supports — TEI and its customizations, or the Orlando and CWRC schemas. Documents that are not well-formed or use an unsupported schema will not open.
Choose an editor mode
LEAF-Writer offers three editor modes, so you can match your encoding to what you plan to do with the output:
- Markup Only — tag in XML using a TEI or Orlando schema, with no Web Annotations.
- Markup and Linking (default) — create XML tags plus equivalent RDF-based Web Annotations for certain tags. Annotations respect the hierarchy of your XML schema (no overlaps) and are stored as JSON in the TEI
<xenoData>element. - Markup and Linking (with overlap) — create RDF annotations for entities that may overlap existing XML structures.
The current mode is shown at the bottom left of the workspace; click the mode indicator to switch.
Get to know the workspace
The editing workspace has four main areas:
- Left panel — three navigation tabs:
- Table of Contents shows the sections of your document and lets you jump between them.
- Markup displays the document's XML tags. From here you can add, delete, edit, copy, and paste tags; hovering over a tag shows its full name and the first few words of its content. (Advanced: right-click
teiHeaderto edit the document header directly.) - Entities lists the entities tagged in the document — viewable sequentially, alphabetically, or by category — with controls to edit an entity's attributes or remove its tag.
- Center editing space — where you read and mark up your text.
- Right panel — three tabs: Raw XML (the underlying code), Image Viewer (for viewing a facsimile alongside your transcription), and Validation (schema validation results).
- Toolbar — all of your tagging options (TEI elements, entity tags, translation) plus tools and settings.
Around the edges of the workspace:
- File menu (three horizontal lines, top left): create, open, or import a document; save or save a new version; export to XML, HTML, or Markdown.
- View toggle (top right, next to your avatar): switch from editing to a read-only viewing mode for sharing your encoded document.
- Mode and schema indicators (bottom left): shows your current editor mode, annotation mode, and schema.
- Bugs/Requests (bottom right): opens an issue form on the LEAF-Writer GitLab repository.
Add markup
There are two basic ways to tag text:
- Highlight a passage, select Tags at the left of the toolbar ribbon, search or scroll to the tag you want, and select OK; or
- Highlight a passage, right-click, and choose Add Tag.
Your schema determines which tags are available at any point in the document. As you tag, your additions appear in the Markup panel, where you can also change a tag (right-click → Change Tag), nest tags (Add Tag Inside), or remove them.
The kinds of markup you'll typically add include:
- Structural markup — the shape of the document: paragraphs, verse lines (
l), emphasis (emph), letter openers and closers, salutations, signatures, datelines, and so on. - Entity markup — tagging people, places, organizations, titles, and dates using the dedicated entity buttons in the toolbar. When you tag an entity, LEAF-Writer prompts you to look up and select a standard identifier from a Linked Open Data authority (such as Wikidata or VIAF) and to record your level of certainty. These identifiers link the same entities across documents and make your data interoperable with others'.
- Notes and annotations — research notes, scholarly notes, citations, corrections, links, and keywords, added via Tag Note and related toolbar buttons, building a scholarly apparatus into your document.
The Validation tab in the right panel continuously checks your document against its schema, so you can catch and fix problems as you go.
Save your work
If your document is stored in GitHub, it saves automatically in the background. You can also save manually in three ways:
- Save or Save As in the file menu (top left);
- Click to Sync (the cloud icon next to the document title — it turns orange with an orange dot when there are unsaved changes);
- Ctrl+S / ⌘+S.
LEAF-Writer saves to the file's source: a document opened from GitHub saves back to GitHub; a document opened from your computer saves to the repository associated with your GitHub login. To save changes to a repository you don't own, the owner must add you as a collaborator in the repository's settings on GitHub — otherwise, you can save your changed version as a new repository that you own.
Export and publish
From the file menu you can export your document in XML, HTML, or Markdown format, ready for further work or for publication on a website. See the LEAF Turning Engine documentation for more on transforming documents.
Keep learning
- LEAF-Writer Basics Step-by-Step Tutorial — hands-on exercises in structural, semantic, entity, and note markup.
- LEAF-Writer Tutorial 1 and Tutorial 2 — video walkthroughs.