HyperDoc (Version 1)
Deprecation Note!
HyperDoc 1.0 is now deprecated and the documentation is just for legacy reasons.
§1 Introduction
The HyperDocument file format is meant to describe rich text files that link between each other.
§2 Structure
The structure of HyperDocument files is pretty simple. Each file starts with a hdoc "1.0" sequence that will mark both "magic number" and format version.
After the header, an arbitrary number of block elements follows. Each block can be considered similar to a paragraph in text documents, but isn't necessarily only a pure text element. The following blocks types are available:
-
h1,h2,h3- First, second and third level headings -
toc- A table of contents -
p- A regular, plain text paragraph -
quote- A block quote -
enumerate- An ordered list, using numbering -
itemize- An unordered list, using bullet points -
pre- A preformatted block of text, optionally with a language tag -
image- A picture that is inserted into the document.
The p, quote and pre blocks contain a sequence of non-nested spans. The following span types are available:
-
span- Regular, unformatted plain text -
emph- Emphasises text -
mono- Monospaced font -
link- Plain text with a hyperlink.
The blocks enumerate and itemize contain elements of type item. Each of those items contain a list of blocks.