- Introduction
- Text Formatting
- Organizing your article (Table of contents, lists, tables, horizontal lines)
- Creating Links
- Including Images
- Svnwiki and programming languages
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.
An alternative option for creating titles is using <h1> <h2>, <h3>, <h4>, <h5> and <h6> tags. There is one important difference with the previous syntax: tags created in this manner will not be included in the articles' Table of Contents. For this reason, you are encouraged not to use this syntax unless you have specific reasons.
Font styles (bold, italics, technical)
To create bold text, use three apostrophes ('), as in: '''bold'''. Use two for italics: ''italics''. 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 >
Special characters
svnwiki automatically replaces certain sequences of characters with HTML entities that browsers display better. The following is the list of sequences:
(R) (C) <- <-> -> <= <=> => -- --- << 1/4 1/2 3/4 >>
This sequences are replaced with these characters respectively: ® © ← ↔ → ⇐ ⇔ ⇒ – — « 1/4 1/2 3/4 »
Quotes
If you want to make quotes, you can start your lines with > (the standard character for email quotation). Alternatively, you can surround it with <blockquote> ... </blockquote>
This text will be show as:
I am enough of an artist to draw freely upon my imagination. Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world.
Organizing your article (Table of contents, lists, tables, horizontal lines)
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 numberd sub sub item * The last item
The above list will be rendered as:
- Some item
- Another item
- A sub item
- Another sub item
- A numbered sub sub item
- Another numberd sub sub item
- The last item
As you can see, you can mix bullets and numbers 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 <table>, <tr> and <td> tags.
Example:
Country | Number of cities |
---|---|
Colombia | 16 |
Argentina | 16 |
Brasil | 31 |
This is shown as:
Country | Number of cities |
---|---|
Colombia | 17 |
Argentina | 12 |
Brasil | 31 |
Currently it is not possible to include parameters in any of the above tags; this will probably be fixed in a future release.
Creating Links
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:
- [[http://cgi.afc.no-ip.info/svnwiki.cgi/default/svnwiki]]
- [[default|Home Page]]
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://cgi.afc.no-ip.info/svnwiki.cgi/defwiki/styles/common/logo.png|Image]]
Renders this:
Svnwiki and programming languages
Syntax coloring
You can embbed code or information in many file formats or programming languages; Svnwiki will use GNU Enscript to highlight it. Use the <enscript> tag and pass the programming language or file format as the highlight parameter.
For example,
<enscript highlight=c> static void pinst_check ( void ) { 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 shonw as:
static void pinst_check ( void ) { 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); }
Note that in order for this to work you'll need to have GNU Enscript installed. If you don't, the information will be shown with no coloring.
The following languages are supported: ada asm awk bash c changelog cpp csh delphi diff diffs diffu dylan eiffel elisp erlang forth fortran fortran_pp haskell html icon idl inf java javascript ksh lua m4 mail makefile matlab nroff oberon2 objc outline oz pascal perl postscript pyrex python rfc scheme sh skill smalltalk sml sql states synopsys tcl tcsh tex vba verilog vhdl vrml wmlscript zsh.
Embedding Scheme code
It is possible to embbed entire programs in the Scheme programming language inside the wiki pages. svnwiki will execute it securely (in a safe environment) and replace it with whatever output it produces.
For example, you could include code that prints some numbers:
<scheme>
(let loop ((a 0) (b 1) (i 0)) (cond ((< i 10) (format #t "<p>~A: ~A~%" i a) (loop b (+ a b) (+ i 1)))))
</scheme>
This code would get replaced with the following:
0: 0
1: 1
2: 1
3: 2
4: 3
5: 5
6: 8
7: 13
8: 21
9: 34
Note that the output of the Scheme code will be included literally in the page (so you can output HTML tags directly).
Literal code
To include something in a page literally (preventing svnwiki to convert it from wiki to HTML), place it inside a <nowiki> ... </nowiki> pair.
If you have suggestions to improve Svnwiki, please let us know.
Last update: 2007-07-06 (Rev 1752)