Convert MDOC to TEI

Turn MDOC files into TEI. A TEI document with sections, lists, tables, links and footnotes; the title, author and date go into its TEI header.

Converted in an isolated sandbox on our serversDeleted after 24 hours

Drop MDOC files on the dialor turn it to pick what to do

A man page as a TEI document.Sections, lists, tables, links and footnotes carry over, with the metadata in the header.

  1. What you get

    One TEI file. The title, author and date of the manual page go into its TEI header, and the body holds the text of the page.

    Sections become headings. Tag lists become definition lists, so each term stays paired with its description. Links and footnotes are kept.

  2. How the markup is mapped

    Flags, arguments and command names are written as code, so they stay distinct from the running text. Column lists become tables, and the first row of those tables is not marked as a header.

    Some macros stand for whole sentences. The sentences that macros such as .Ex -std stand for are written out in full in the TEI file.

  3. What changes

    The section number is dropped. The headings keep their names but not the number that comes with the manual section.

    There are no options to set. Each conversion produces one file. See every MDOC conversion or every TEI conversion for other routes.

MDOC and TEI.What each format is.

The formats

From · MDOC

BSD mdoc Manual

Manual pages written in the semantic mdoc macros of BSD systems and macOS.

Extensions
.mdoc
MIME type
text/x-mdoc
Kind
Text and data
To · TEI

TEI XML

Text Encoding Initiative XML, the format scholarly editions and digital humanities archives keep texts in.

Extensions
.tei
MIME type
application/tei+xml
Kind
Text and data

In your code.The same MDOC to TEI conversion through the API, for your app or your agent.

terminal
$ cv convert report.mdoc report.tei
$ cv convert report.mdoc report.tei

Questions.What people ask about MDOC to TEI.

01OF 04

They go into the TEI header of the output file.

They become definition lists. Each term is paired with its description.

Yes. The sentences that such macros stand for are written out in the TEI file.

No. The section number is dropped.

More conversions.Other ways in and out of MDOC and TEI.