You are looking at historical revision 19306 of this page. It may differ significantly from its current revision.

Editing help

This wiki uses a simplified version of the wiki syntax used by svnwiki. Below you will find an explanation of the subset that's supported by this wiki:

Text Formatting

Creating a paragraph

To create a paragraph simply enter the text. You can place a single newline anywhere in your paragraph and it will have no effect.

To split a paragraph use two consecutive newlines (an empty line).

The above two paragraphs could have been written as:

To create a paragraph simply enter the text.
You can place a single newline anywhere in
your paragraph and it will have no effect.
To split a paragraph use two consecutive newlines (an empty line).

Creating titles

To create a title, use a line starting with two, three, four or five equal signs:

== Title Name
=== Sub-title Name
==== Sub-sub-title Name
===== Sub-sub-sub-title Name

If you use two equal signs, you will create a top-level title. The more equal signs you use, the less important your title will be. The levels correspond to HTML's <h2> up to <h6> tags. The first level is reserved for use by the wiki itself.

This wiki does not support the <h1>..<h6> syntax for headings.

Font styles (bold, italics, technical)

To create bold text, use three apostrophes ('), as in: <nowiki>'bold'</nowiki>. Use two for italics: <nowiki>italics</nowiki>. For type-written text, which is useful for technical documentation, use this syntax: {{text}}.

Related with type-written text, you can mark entire paragraphs to be shown in type-written text. This is used for lines that correspond to program's output or commands that a user should enter. To active this all you need to do is start each line in your paragraph with a space. Paragraphs written in this manner are shown as follows:

> uptime
 23:04:03 up 14:18,  1 user,  load average: 0.02, 0.06, 0.18
> uname -a
Linux azul 2.6.10 #1 Mon Feb 7 00:20:16 COT 2005 i686 GNU/Linux
>

Organizing your article (Table of contents, lists, tables, horizontal lines)

Table of Contents

If you want to show the table of contents of an article, use the following code:

<nowiki>[[toc:]]</nowiki>

This will be replaced with the table of contents. You can see an example at the beginning of this page.

Lists of items

You can create lists of bullets or numbers by starting your lines with asterisks or number signs:

* Some item
* Another item
** A sub item
** Another sub item
**# A numbered sub sub item
**# Another numbered sub sub item
* The last item

The above list will be rendered as:

As you can see, you can mix bullets and numbered lists any way you want.

Lists of Definitions

You can create a list of definitions by using multiple lines with the following syntax:

; ''TERM'' : ''DEFINITION''

This is useful to give a list of terms along with their respective definitions.

Example:

; Lassie : A very intelligent dog.
; Garfield : A pessimistic cat.
; Tux : A fearsome pinguin.

This list is shown as:

Lassie
A very intelligent dog.
Garfield
A pessimistic cat.
Tux
A fearsome pinguin.

Using tables

You can create a table using the standard HTML syntax, based on the <tt><table></tt>, <tt><tr></tt> and <tt><td></tt> tags.

Example:

<nowiki>&lt;table&gt;</nowiki>
<nowiki>&lt;tr&gt;&lt;th&gt;Country&lt;/th&gt;&lt;th&gt;Number of cities&lt;/th&gt;&lt;/tr&gt;</nowiki>
<nowiki>&lt;tr&gt;&lt;td&gt;Colombia&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;</nowiki>
<nowiki>&lt;tr&gt;&lt;td&gt;Argentina&lt;/td&gt;&lt;td&gt;16&lt;/td&gt;&lt;/tr&gt;</nowiki>
<nowiki>&lt;tr&gt;&lt;td&gt;Brasil&lt;/td&gt;&lt;td&gt;31&lt;/td&gt;&lt;/tr&gt;</nowiki>
<nowiki>&lt;/table&gt;</nowiki>

This is shown as:

Country Number of cities
Colombia 17
Argentina 12
Brasil 31

This syntax is rather restricted and clumsy; it is hoped that in a future version there will be better syntax for tables.

Horizontal dividing line

You can include an horizontal dividing line with the followking markup:

----

This is shown as:


To create links use [[dst]], where dst is the link target. You can use relative or absolute URLs.

If you want your link to display a text other than its target, use [[dst|Some text]]. This will be shown as: Some text.

Here are some examples:

Including Images

To include images in your articles use the following text:

[[image:URL|ALT]]

Here you'll need to replace URL with the URL of your image (which can be absolute or relative) and ALT with a simple description of the image.

Example: [[image:http://www.call-with-current-continuation.org/chicken-small.png|Chicken logo]]

Renders this:

Marking up code

Syntax coloring

You can embbed code or information in many file formats or programming languages; the wiki will use the colorize egg to add syntax highlighting to it. You can use any language supported by colorize. This is a growing list.

<enscript highlight="c">
static void
pinst_check ()
{
  pid_t pinst = pinst_find();
  if (pinst != -1 && kill(pinst, 0) != -1)
    printf("%s: server alive (%d)\n", program_name, pinst);
  else
    printf("%s: server is not running\n", program_name);
  exit(EXIT_SUCCESS);
}
</enscript>

is shown as:

static void
pinst_check ()
{
  pid_t pinst = pinst_find();
  if (pinst != -1 && kill(pinst, 0) != -1)
    printf("%s: server alive (%d)\n", program_name, pinst);
  else
    printf("%s: server is not running\n", program_name);
  exit(EXIT_SUCCESS);
}

Literal blocks of preformatted text

Sometimes you don't want any fancy formatting or interpretation at all, you just want to dump a block of preformatted text as-is onto a wiki page.

Examples include license statements, transcripts of shell sessions, code in alien languages not supported by colorize or when you're frustrated by the wiki because it keeps interpreting what you're trying to put on a page.

This is easily done by simply prefixing each line of the text you are pasting by at least one space.

Like this!

Escaping wiki interpretation

To include something in a page literally (preventing the wiki from converting it to HTML), place it inside a <nowiki> ... </nowiki> pair. This currently only has an effect on HTML output (not the other outputs supported by multidoc, so please don't rely on it too much.

Extensions for Chicken documentation

Tags for procedure-like definitions

The following tags are supported:

Each of these should be used as follows:

 <procedure>(string-append a b ...)</procedure>

This will be roughly rendered as follows (with some divs and spans for easy CSSing):

[procedure] (string-append a b ...)

Tags for other definitions

The following tags are also supported:

They should be used as follows:

 <string>doctype:xhtml-1.0-strict</string>

This will be rendered roughly as follows:

[string] doctype:xhtml-1.0-strict

Tags for examples

Important: the syntax described below is deprecated and will likely be removed Real Soon Now. Do not use it!

If you want to include examples, use the following code:

 <example>
 <expr>(string-append "foo" "bar")</expr>
 <result>"foobar"</result>
 </example>

If your example has more than one line, just put them within one <expr> tag. Do not put empty lines in an <examples><example> tag. You can put empty lines within <expr>, though.

If the example shows some interaction, use this:

<example>
<expr>(prompt-for-number-and-show-factorial)</expr>
<output>Enter a number:</output>
<input>4</input>
<output>24</output>
<result>24</result>
</example>

If the result of the evaluation is not specified, omit the <result></result> part.

If the example requires some set up to take place before the actual code, please add an <init> section:

<example>
<init>(use format-modular)</init>
<expr>(format #t "Objs: ~A~%" 24)</expr>
<output>Objs: 24</output>
</example>
</nowiki>

The code in the <init> section will probably not be shown to the users unless the explicitly ask for it (ie. will be hidden with JavaScript, or shown with less emphasis than the actual code).

We expect to automatically build a page including all the examples in the wiki, indicating whether or not they pass.