Brad Templeton Home
ClariNet

Interviews

EFF

Jokes / RHF

SF Publishing

Software

Articles

Spam

Dot!

Packages

Interests


RHF Home

Copyright Myths

Emily Postnews

Africa

Burning Man

Alice Pascal

The Rules for Guys

Bill Gates

   
 

Simple Formatter Language

Simple Formatter Language

I do a lot of my text up in this simple formatter language. I have a program that translates from it to HTML or RTF or other forms. The rules are simple:

Blank line between paragraphs. Commands (which begin with a dot) also delimit paragraphs.

Most substitutions done by brace functions in the form {funcname args}. So for example {bo boldwords} gives you boldwords. You can escape a brace with \{, and get a backslash with \\.

  • {bo words} -- bold
  • {it words} -- italic
  • {large words} -- large
  • {small words} -- small
  • {link URL}{ltext anchor-of-link} -- Brad's Home Page.

There are dozens more.

Dot-Commands

The dot commands do your block stuff.

  1. .chapter <text> -- Header and title.
  2. .topic <text> -- Level 2 header
  3. .subsect <text> -- Level 3 header
  4. .subsectc <text> -- Level 4 header
  5. .line -- a line
  6. .begin list -- each paragraph is a OL element until ".end list"
  7. .begin bullets -- each paragraph is a UL element until ".end bullets"
  8. .begin box -- put text in a box (simple table) until ".end box"

There are dozens more of these too.