DocBasicSyntax 

TB Wiki

Login

DocBasicSyntax

Here is information about basic syntax for TBWiki:

General markup [edit section]

  • a blank line = a paragraph break
  • 4 or more dashes alone on line = a horizontal rule
    • number of dashes = thickness of line

(below this is a thin line, formed with ----)


(below this is a thick line, formed with ----------)

  • italic = surround text by two single-quotes

''italic'' = italic

  • bold = surround text by three single-quotes

'''bold''' = bold

  • code (monospaced font) = surround text by two backticks

``code`` = code

Headings [edit section]

  • leading and trailing '=' at start of line => headings
    • number of '=' = heading level

2nd level heading [edit section]

was made with == 2nd level heading ==

3rd level heading [edit section]

was made with === 3rd level heading ===

4th level heading [edit section]

was made with ==== 4th level heading ====

Bullet Lists [edit section]

You uses '*' or '-' with indentation, to create bullet lists:

     * space and '*' = bullet
       * indentation = bullet level
     * indentation back to previous level does the right thing
    
     - you can use multiple lines for the content on
       the same bullet level, by indenting them the same level
       as the starting text
       - this is indented for a second-level bullet
         item, with multi-line text

Produces this:

  • space and '*' = bullet
    • indentation = bullet level
  • indentation back to previous level does the right thing

  • you can use multiple lines for the words on the same bullet level, by indenting them the same level as the starting text
    • this is indented for a second-level bullet item, with multi-line text

Definition lists [edit section]

You can create definition lists with the following syntax:
; word: definition

example:

Red Baron
a very good pilot in world war I
Snoopy
a dog from the Peanuts cartoon

Definition lists should end with a blank line.

Images [edit section]

You can add inline images on a page with the syntax:
  • [[image:image-name.jpg]] or
  • [[image:http://server/remote-image.jpg]

The image name can refer to a local file or a remote file. If the image name starts with 'http', it is treated as a full URL to a remote site. A local file refers to a filename in this wiki's files area area (where uploaded files reside).

image options [edit section]

You can optionally add options to control image display and handling, by placing a vertical bar after the image filename, followed by image options. The following options are supported:
  • width="xxx"
  • height="yyy"
  • alt="alternate text"

If multiple attributes are used, they should be separated by a spaces.

Note that this is the same syntax as used for HTML <img> tags.

Example:

  • [[image:image-name.jpg|height="200" alt="This is neat"]]

image options [edit section]

Links [edit section]

Links are either interpreted from plain text, when the part before the colon is a recognized URL prefix (http:), or are specified with surrounding double square brackets.

  • http:/server/page - automatically converted to link
  • double-square bracket - link to local page e.g. [[FrontPage]] => FrontPage
  • double-square bracket with remote url - [ [http://google.com/]] => http://google.com/
  • vertical bar inside brackets = separates link from cover text
  • link to local files: [[file:filename.doc]]
  • link from image: [[image:image-name.jpg|FrontPage]]
  • link from remote image to local page: [[image:http://server/image-name.jpg|FrontPage]]
  • link from local image to remote page: [[image:image-name.jpg|http://server/other-page.html]]

Special marks [edit section]

The following special mark is supported:
  • caret-slash

 ^/ shows a green checkmark

Here is an example:

checkmark green checkmark supported!

Preformatted text [edit section]

Use triple braces to indicate text that should be output in pre-formatted format. That is, the word wrappings and leading spaces will be preserved.

{{{
  this
    is
      preformatted
    text
} }}

Will display as this:

  this
    is
      preformatted
   text

Note that markup will not be processed inside a block of preformatted text:

{{{
  Here's a [[link]]
} }}

Yields:

  Here's a [[link]]

Blocks [edit section]

  • preformatted text - use triple braces, and no name
  • named block - use triple braces and a name on the top line
  • hidden block - use triple braces and a leading '#' in the name
  • processor block - put the processor name after #! on the top line
  • named table block - put the table name after the #!Table processor directive

named block

{{{MyData
<put data here>
}} }

hidden block

{{{#HyHiddenData
<this data won't display on the page
}} }

processor

{{{#!PigLatin
This will display as pig latin!
}} }

named table block

{{{#!Table:BlockName
<table spec and data>
}} }

Macros and processors [edit section]

Macros are invoked with double braces. Processors use triple braces, and #! preceding the processor name.

Macros [edit section]

Common Macros [edit section]

  • {{BR}} - forced line break
  • {{TableOfContents}} - insert a table of contents
  • {{HTML(text)}} - insert raw text unprocessed in HTML output
  • {{Include(page)}} - include another page in this one

System Macros [edit section]

  • {{RecentChanges}} - show the list of recent edits
  • {{SystemInfo}} - show information about the tbwiki system
  • {{TitleIndex}} - show the list of pages on this site

Processors [edit section]

Processors can invoke plugins to produce output calculated at runtime (that is, at the time of page access).

Useful processors [edit section]

Some useful processors:
  • #!Table - table processor
  • #!WebSed - page scraping processor
  • #!SlideShow - show a page as a slide show
  • #!bc - calculator processor (see 'man bc')
  • #!RegEx - do interactive RegEx testing
  • #!RunningChart - show running chart from table data
  • #!YellowBlock - show text inside a yellow block

Demonstration processors [edit section]

  • #!FooReplace - replace 'foo' with 'bar' in content
  • #!PigLatin - change text to pig latin
  • #!UserChoice - show how to use sub-actions

In-progress processors [edit section]

  • #!Transcriber - used to transcribe videos
  • #!User - used for user account administration

Testing processors [edit section]

  • #!GetBlock - test for internal get_block() routines
  • #!RegressionCheck - test for markup-to-html conversion correctness

TBWiki engine 1.9.1 by Tim Bird