Status: correct for version 0.6.2.
The Regular Old Text Formatting Language (ROTFL), created by Chris Lumens <email@example.com>, 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 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.
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.
Headers may contain metadata, or information about the document. Only four tags may be present in the header. Possible other tags are
.[A, for the author's name,
.[D, for the date,
.[T, to specify the title (required),
.[V, for the version of ROTFL you are writing to.
The author's name, email address, and anything else that will fit on one line, may be placed after the
The modification date of the record, using ISO format (
YYYY-MM-DDTHH:mm:SS), may be specified using the
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 tags. These take no arguments (text after
.[H is discarded).
.[A Mike Burns firstname.lastname@example.org
.[T Apples and Oranges
In the example, the author is 'Mike Burns email@example.com'. 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'.
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
.[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
Forced indention for 12 spaces is done with
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
Unordered lists are presented as a bulletted list; ordered lists use sequential numbers.
.[R .[H .[A Mike Burns firstname.lastname@example.org .[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
Show off! by Mike Burns email@example.com 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 --