This information is provided for reading ``.htx'' files using the toolbox classes, but not MrEd and its hyper-text classes.
A hypertag is made up of a name (an arbitrary character string) and a position (a buffer position). A hyperlink is made up of an anchor-start and an anchor-end (the clickable range of buffer positions), a reference-file (a relative path name), and a reference-tag (the name of the destination tag in the reference-file). If the reference-file is the empty string (``''), then the reference-file is the same file as the file containing the link.
An ``.htx'' file is stored in the standard media file format, with
additional hyper-text information in the footer section.
There are two file footers called ``wx-hypertags'' and ``wx-hyperlinks''.
The format for ``wx-hypertags'' is:
<integer:tag-count> <tag>*
where each <tag> has the form:
<integer:name-string-length> <string:name-string> <integer:position>
For example, a file with the tag ``top'' at position 0 and ``fred'' at
position 17, the ``wx-hypertags'' footer data is read from the file stream
as:
2 4 "fred" 17 3 "top" 0
The format for wx-hyperlinks is:
<integer:link-count> <link>*
where each <link> has the form:
<integer:anchor-start> <integer:anchor-end>
\><integer:reference-file-string-length>
\><integer:reference-tag-string-length>
\><string:reference-file-string>
\><string:reference-tagstring>
For a example, a file with a link from position 20 to 25 back to the
``top'' of the file and a link from position 32 39 to tag ``fred'' of file
``foo.htx'' is read from the file stream as:
2 32 39 6 4 "foo.htx" "fred" 20 25 0 3 "" "top"
Both footers must have their data sorted from high file position to low file position. Link file positions may not overlap in any way. Tags may share file positions and ``ties'' can be settled in any order. It is not necessary that a file have a ``top'' tag or that it corresponds to position 0; however, this is a good convention to follow.