Metadoc

Metadoc is a translation program that converts plain text documents with certain metadata tags into HTML.

The source code is available in several different languages.

The C version requires the rstring library, which is available here.

The C++ version requires the rstrcpp library, which is available here.


Metadoc recognizes the following tags and attributes:

Tag Meaning
---body begin body section
---br line break
---c comment
---css inline CSS
---h1 first-level header
---h2 second-level header
---head begin head section
---l hyperlink
---pnum show paragraph numbers
---q quotation
---r raw HTML
---t new line of text
---td table data
---th table header
---ul unordered list
--- end current section

Attribute Meaning
<tab>cn generate n columns
<tab>rn generate n rows
<tab>code use monospace font
<tab>nocode override monospace font
<tab>gray insert gray table cell
<tab>mark highlight table cell

Usage:

  ./metadoc INPUT_FILE > OUTPUT_FILE


Example 1

This document was generated from this input file.


Example 2

This table was generated from this input file.