Home > Main Index | Changes | APW

TextFormatRules

Search 

1. Introduction
The purpose of this tool is to make it very simple to add content in order to build a knowledge-base.

There are two categories of formatting commands, those which apply to the current line and those which act on a block of text. The latter define a block of text as all the content that is indented (with spaces!) beyond the command.

2. Basic Text Format Commands
The commands in this section only work within the current line and apply to a group of words.

2.1. Strong Text
Text enclosed between two '*' characters is presented in bold. For example
  *text*
is rendered as text .

2.2. Emphasized Text
Text enclosed between two '_' characters is presented in italics. For example
 _text_
is rendered as text .

2.3. Strong Emphasized Text
Text encolosed in between '__' or '*_' will be presented in bold italics. For example
  __text__ or *_text_*
is rendered as text .

2.4. Embedded Code Sections
Text enclosed in between '=' characters will be shown in a typwritter font. For example
   =text code=
is rendered as text code .

2.5. Automagic URL Formatting
Whenever you write a plain URL in the text the formatter will automatically convert it into a link to that URL.

2.6. Embedding Images
When an URL to an image is found the formatter will replace it with an image tag so the browser can display it. If more control is needed the IMG: tag can be used. The format is of the form

IMG: filename or URL

IMG(Attributes): filename or URL

where the attributes can be any of 'left', 'right', 'top', 'bottom, 'middle' or any of the 'NAME=VALUE' pairs for an IMG tag.

A special feature of this command is that if the filename provided is that of an attached file in the page itr will use it as the source of the image.

2.7. CODE Formatting
In order to embed pre-formatted code it is possible to use the CODE or PRE tags. For example the text below
   CODE: 
     $x = 2*$y ;          # A program line
     %z = ( 'a' => 9 ) ;

is shown as
    $x = 2*$y ;          # A program line
    %z = ( 'a' => 9 ) ;

3. List Commands
This section contains a set of commands which are used to build lists. All the lists are defined by a starting sequence of characters and the entry content. The membership to a list is determined by the level of indentation. Lists can be arbitrarely nested.

3.1. Bullet List
Bulleted lists are built by a line starting with a '*' character. The following code
   * First Item
   * Second Item
is rendered as
  • First Item
  • Second Item

3.2. Numbered List
Bulleted lists are built by a line starting with a a number followed by a period character. The following code
   1. First Item
   4. Second Item
is rendered as
  1. First Item
  2. Second Item
Note that the numbers you provide are not used!

3.3. Definition List
The last type of list is obtained by following a label with a ':' character. For example
  Label 1:  First entry
  Label 2:  Second entry
is rendered as
Label 1
First entry
Label 2
Second entry

4. Other Block Commands
There are times when we need to apply some format property to a whole paragraph. For this purpose the \block{format tag} is used to define an indented block with the desired format tag. For example
   \block{STRONG}
       AAAAAA
           
       BBBBBB
would result in the following output

AAAAAA

BBBBBB

The format tag closes when the indented paragraph ends.

  Edit | Attach | Ref by | Search Updated 31 Mar 2005 - 03:57