Contents Previous Next

The .t2t document Areas

Txt2tags marked files are divided in 3 areas. Each area have its own rules and purpose. They are:

Header Area
Place for Document Title, Author, Version and Date information.
Config Area
Place for general Document Settings and Parser behavior modifiers.
Body Area
Place for the Document Content.

All areas are optional. You can write a txt2tags document with just headers (such as our first example), or a document with no headers or settings.

The areas are delimited by special rules, which will be seen in detail on the next chapter. For now, this is a representation of the areas on a document:

             ____________
            |            |
            |   HEADERS  |       1. First, the Headers
            |            |
            |   CONFIG   |       2. Then the Settings
            |            |
            |    BODY    |       3. And finally the Document Body,
            |            |
            |    ...     |          which goes until the end
            |    ...     |
            |____________|

In short, this is how the areas are defined:

HeadersFirst 3 lines of the file, or the first line blank for No Headers.
ConfigBegins right after the Header (4th or 2nd line) and ends when the Body Area starts.
BodyThe first valid text line (not comment or setting) after the Header Area.

Full Example

My nice doc Title
Mr. John Doe
Last Updated: %%mtime(%c)

%!target  : html
%!style   : fancy.css
%!encoding: UTF-8
%!options : --toc --enum-title

Hi! This is my test document.
Its content will end here.

Contents Previous Next