You have learned about TEI now––so what? Where can you start? Let's now learn how we can make use of the text we encoded in Markdown to add more semantic tags to the document.
This video demo below shows how you can use Pandoc to convert a document written in Markdown into basic XML structure, paving the way for more semantic markup in TEI. As I say in the video, Pandoc is a terrific tool for converting all kinds of documents. It can also help you transform a quickly-authored transcription in Markdown into XML structure, which saves you some time.
To follow along, you will need to have installed Pandoc. You should also
use either your Markdown transcription of the Pope text from the
previous session or your own text.
For Mac and Linux:
For those on Mac OS, and most Linux installations, you already have a bash shell installed.
Open your Terminal (Applications > Utilities > Terminal).
Windows Only: Installing Git BashYou will need to install Git Bash. This can be installed by downloading the most recent ‘Full installer’ at this page. Instructions for installation are available at Open Hatch.
Pandoc syntax used in the video:
To change directories in your Terminal (or Git Bash shell):
cd then hit enter (this takes
you to your home directory).
In the video I enter
cd Dropbox : this
takes me to my Dropbox folder (you can just navigate to the
directory where your Markdown file lives).
To convert from md to xml:
To convert from md to TEI XML:
To learn more about working on the command line interface, check out this useful tutorial: https://programminghistorian.org/en/lessons/intro-to-bash.
Pandoc is a universal document converter from the command line: https://pandoc.org/
Converts md to docx, html, PDF, and pretty much anything else...
Sample syntax: pandoc text.md -o text.html
Converts to TEI (simple).
Sample syntax: pandoc text.md -o text.xml --to=tei