ROTFL Documentation

Status: correct for version 0.6.2.

The Regular Old Text Formatting Language (ROTFL), created by Chris Lumens <chris@bangmoney.org>, is a simplistic text formatting language. Other examples of different text formatting languages are TEX, HTML, and groff.

ROTFL is meant to be easy to create, learn, and use. A line may begin with zero or one tag. A tag is an unprinted character that tells the ROTFL 'browser' information on the text following the tag. A tag is three characters an follows a set pattern: a period, a bracket (opening or closing), and a Latin letter. For example, .[A is the author tag. Tags, unless otherwise specified, operate on a line-by-line basis - they are only good for the line they appear on.

If no tag is specified, the text is taken as it appears. Spaces are rendered as entered, even when preceded by a tag.

Documents are broken up into records. One record is displayed at once, and multiple records may exist in a single document.

The Rendering Engine

The actual ROTFL program, which parses and displays ROTFL records, is simple to use.

Three commands are recognized; next (n), quit (q), and table of contents (t). The next command displays the next record in the tree; if no more records exist, the program exits. The quit command quits quickly from the ROTFL parser. The table of contents command displays a list of records for you to choose from.

Tags

Writing ROTFL requires only a simple ASCII text editor and a real operating system.

ROTFL documents are broken up into records. Each record must contain a header section and the body. Anything that is not the header is the body.

The record, header, and list tags are the only tags which may, and must, be closed. All other tags must not be closed. To start a record, use the .[R tag; to close it, use .]R. No data may exist outside of a record.

Line comments are created with the .[# tag and are ignored. These are useful for readablity. For example, .[# Hello, world! would be ignored by the parser.

Header

Headers may contain metadata, or information about the document. Only four tags may be present in the header. Possible other tags are

The author's name, email address, and anything else that will fit on one line, may be placed after the .[A tag.

The modification date of the record, using ISO format (YYYY-MM-DDTHH:mm:SS), may be specified using the .[D tag.

For the title of the document, useful for the table of contents, indexing, and to help the user read your record, is specified using the .[T tag. Keep it short but informational.

The version of ROTFL that you write for is important, and is specified using the .[V tag. This is useful so legacy tags may be supported differently from new tags.

To create the header, use the .[H and .]H tags. These take no arguments (text after .[H is discarded).

Example header:
.[H
.[A Mike Burns netgeek@speakeasy.net
.[D 1999-08-28T21:28:25
.[T Apples and Oranges
.[V 0.6.2
.]H

In the example, the author is 'Mike Burns netgeek@speakeasy.net'. The record was last modified August 28, 1999 at 9:28:25 PM. It was created for ROTFL version 0.6.2 and has a title of 'Apples and Oranges'.

Body

After the closing of the header (via the .]H tag), the body of the record starts. Listed below are possible tags for use in the body:

Text alignment may be done with either the .[c or .[r tags, which create center and right aligned text, respectively.

Tags are provided to overline and underline text. To overline text with one line, use the .[o tag; for two overlines, use .[O. For single underlining, use the .[u tag; double uses .[U.

Forced indention for 12 spaces is done with .[I.

Lists may be nested and therefore required an opening and closing tag. The opening unordered list tag is .[L, while the opening ordered list tag is .[L #. Lists with another type of bulet may be specified by following .[L with a space and the character to bullet the list with. The closing is .]L. Items in the list must be ented prefixed with .[l.

Unordered lists are presented as a bulletted list; ordered lists use sequential numbers.

Appendix A: Example

ROTFL Document

.[R
.[H
.[A Mike Burns netgeek@speakeasy.net
.[D 1999-08-31T03:56:23
.[T Show off!
.[V 0.6.2
.]H
.[c Show off!
This
.[r record
.[o is
.[u used
.[I to
.[O show
.[U off
.[L
.[l some
.[l features
.]L
.[L #
.[l of
.[l ROTFL.
.]L
.[L -
.[l So
.[l what
.]L
do you think?
.]R

ROTFL Rendering

Show off!                                   by Mike Burns netgeek@speakeasy.net
                                                   added on1999-08-31T03:56:23

                                 Show off!
 This

                                                                        record

 --
 is

 used
 ----

             to

 ====
 show

 off
 ===

    o some
    o features

    1 of
    2 ROTFL.

    - So
    - what

 do you think?


-- end of record  | hit 'n' for next --

Home - Contents - Search

Mike Burns <mike@mike-burns.com>