Post Edit Home Help

Key Pages

Home |
Categories |
Markup |
Statistics |
Protected pages

Changes [Sep 25, 2007]

Categories
WubWiki
Low hanging fruit
Wild ideas
Not-so-wild ideas
Download wiki datab...
Revision history
   More Changes...
Changes [Sep 25, 2007]: Categories, WubWiki, Low hanging fruit, Wild ideas, ... MORE

Find Pages

The new WubWiki based on Wub created by colin supports the markup available in the wikit implementation. Starting from this markup and work done by stevel, I modified WubWiki to support the following new markup:


Option/value lists

A list of option/value pairs can be added to a wiki page using the following markup:

 +++ 
 option  value 
 option  value
 option  value
 option  value
 +++

The option part is the part up to the first tab or, if not tab is found, up to the first double space. If no tab and no double space is found, the option part is the part up to the first space. The option part will be rendered as pre-formatted fixed-width text. In-line markup can be used in the option-part.

The value part is the part following the first tab or, if not tab is found, following the first double space. If no tab and no double space is found, the option part is the part following the first space. The value part will be rendered as normal text, taking in-line markup into account.

Options and values will be place in a two column table.

A screenshot of some option/value lists can be found here.


Fixed font block with in-line markup

A block of text surrounded by 3 equal signs will be rendered as pre-formatted fixed-width text, taking in-line markup into account. The block delimiter must be placed on its own line. An example of this markup:

 ===
 Block of text rendered with fixed-with font
 while taking ''in-line'' '''markup''' into account.
 ===

A screenshot of some fixed font blocks can be found here.


Fixed font block without in-line markup

A block of text surrounded by 6 equal signs will be rendered as pre-formatted fixed-width text. In-line markup is ignored. This is most useful to include code snippets without having to put a space in front of each line.The block delimiter must be placed on its own line. An example of this markup:

 ======
 Block of [text] rendered with fixed-with font
 while '''not''' taking in-line markup into account.
 ======

A screenshot of some fixed font code blocks can be found here.


Fixed font text inside regular text

Putting a piece of text between back-quotes will display that piece in a fixed-width font.


Tables

Tables can be specified by putting the cell data between | signs. All cells in a row must be placed on a single line. The first and last character of a line containing a row must be | signs. A table ends when a non empty line does not start with a | sign. In-line markup is taken into account. An example:

| Cell 0.0 | Cell 0.1 | Cell 0.2 |
| Cell 1.0 | Cell 1.1 | ''Cell'' 1.2 |
| Cell 2.0 | Extra wide cell two dot one| '''Cell''' 2.2 |
| [wiki] | Cell 3.1 | [http://www.tcl.tk/images/tcllogo.gif] |

This table is shown in this screenshot.


Headers

Headers can be added to structure a wiki page. You specify headers using the following markup:

 **Header**
 ***Sub-header***
 ****Sub-sub-header****

A header must be placed on its own line and can contain in-line markup (bold, italics, ...). These headers are rendered in HTML as h2, h3 and h4 headers respectively.

These headers are used to generate a table of contents for the page. Check the Categories page for more info on tables of contents.

I added some headers to my wiki page. This is how it looks now. Note the page-TOC on the left based on the headers added in the wiki page.


Eval

An experimental "eval" facility was implemented in the local mode wikit by stevel.

An eval is introduced by the "+eval" directive, which must refer to a page which will be evaluated and the results inserted into the rendered page in the place of the eval.

For example, in the Critcl documentation there are references like the following:

    For example, the output of the '''critcl -show''' command on the current platform is:
    ======
    +eval [Code - showconfig]
    ======

and the "Code - showconfig" page contains the following:

    ======
    # show current Critcl configuration

    lappend auto_path [file join [file dirname $wikidir] lib]
    package require critcl

    critcl::showconfig
    ======

When evaluated, this causes the critcl::showconfig procedure within the critcl package to be run, and the results substituded in place of the +eval.

Also note that fixed-text markup within the page being eval'ed is ignored, so that the code (as rendered) can be more readable.

jdc This eval feature also works within WubWiki but will need a safe interpreter. Also caching makes it difficult to see the changes made to the code page. Best to disable this within WubWiki?


Placeholder for stevel's +include markup...hint hint :)

Hint taken ... now I have to remember what it does? :)

Edit this Page - Attach File - Add Image - References - Print
Page last modified by stevel Wed May 09/2007 07:38
You must signin to post comments.
Site Home > Tclers Wiki Forum > Markup