Wiki page content may be in any of the following formats as indicated by a <DOCTYPE> declaration at the top of the page.
Declaration | Format |
---|---|
<!DOCTYPE WIKIT> | Traditional Wikit format (default) |
<!DOCTYPE MARKDOWN> | Markdown format |
<!DOCTYPE TCL> | Page generated by a Tcl script |
<!DOCTYPE TCLPART> | Page content generated by a Tcl script |
<!DOCTYPE HTML> | Page in HTML |
<!DOCTYPE HTMLPART> | Page content in HTML |
If the declaration is absent, Wikit format, described by the rest of this page, is assumed. Note: Wikit features such as <<toc>>, <<backrefs>>, <<tags>>, <<categories>> etc. are only supported with this format.
The formats TCL and HTML do not give you the black navigation bar at the top of the page but are meant to build complete HTML pages. If you want to page to have the Wiki look including the navigation bar, you must use TCLPART and HTMLPART.
The TCL and TCLPART formats are expecting the Tcl script to emit HTML via the puts command. This is what gets rendered (and not what is returned by e.g. return). You can stop processing a part of your Tcl script by using return.
There are 3 heading levels available. Put a heading surrounded by two, three or four asterisks on a separate line. Example:
**Heading 1** ***Heading 2*** ****Heading 3****
Note: the page title is put above your text and uses a 'Heading 1', so any 'Heading 1' is rendered with the same font size and style as the page title.
Separate two paragraphs with an empty line. Example:
This is a first paragraph. This is a second paragraph. This is not a third paragraph as there is no empty line between this line and the previous one.
To insert a horizontal ruler, use a line like this:
----
Rendering result:
A code block is surrounded by lines containing six equal signs. The opening equal signs can be followed by a language name. This language name will be used to highlight the syntax. Known languages are:
tcl | Tcl/Tk |
c | C |
cpp | C++ |
none | no highlighting |
If no language is specified, tcl is assumed. The following example is Tcl/Tk code:
======tcl set a [expr {$b + $c}] ======
Rendering result:
set a [expr {$b + $c}]
Code blocks are rendered in a fixed width font. No further rendering is done inside code blocks.
Lines starting with a space are also rendered in a fixed width font, but no syntax highlighting is done:
I'm a line starting with a space.
Rendering result:
I'm a line starting with a space.
A fixed width block is surrounded by lines containing three equal signs. As in code blocks, the opening line can be followed by a language name (see Code Blocks for known languages). Example:
===c for(int i = 0; i < 10; i++) { printf("%d\n", i); // Taken from [Help] } ===
Rendering result:
for(int i = 0; i < 10; i++) { printf("%d\n", i); // Taken from Help }
Fixed width blocks are rendered in a fixed width font. Opposite to code blocks, markup in fixed width blocks is still processed.
To center one or more block of content, enclose it in lines containing nothing but six exclamation marks. Example:
!!!!!! This content will be centered. !!!!!!
Rendering result:
This conent will be centered.
An option block starts and ends with a line containing three plus signs. Within those lines, each lines contains an option and a description separated by a tab or two spaces. This defines some option definitions:
+++ Tcl The Tool Command Language Tk Graphical toolkit on top of Tcl Tcl OO Object oriented toolkit on top of Tcl +++
Rendering result:
Tcl | The Tool Command Language |
Tk | Graphical toolkit on top of Tcl |
Tcl OO | Object oriented toolkit on top of Tcl |
Descriptions can be specified using a line starting with three spaces, the term followed by a colon, three spaces and the description. An example:
Tcl: The Tool Command Language Tk: Graphical toolkit on top of Tcl Tcl OO: Object oriented toolkit on top of Tcl
Rendering result:
HTML can be inserted into a page surrounded by lines containing <<inlinehtml>>. Example:
<<inlinehtml>> This is <b>bold</b>. <<inlinehtml>>
Rendering result:
This is bold.Supported inline markup:
Italics: ''enclose text in two single quote characters.'' Bold: '''enclose text in three single quote characters.''' Fixed width font: `enclose text in back quote character.` Line break: a line break between a en b can be forced like this a<<br>>b Space: a space between a and b can be forced like this a<<nbsp>>b Pipe character: <<pipe>> Opening square bracket: [[ Closing square bracket: ]]
Rendering result:
Italics: enclose text in two single quote characters. Bold: enclose text in three single quote characters. Fixed width font: enclose text in back quote character. Line break: a line break between a and b can be forced like this a
b Space: a space between a and b can be forced like this a b Pipe character: | Opening square bracket: [ Closing square bracket: ]
Sometimes the renderer gets confused about singles quotes when using them in different locations on the same line. In such cases, put a second use on a new line.
Ordered and unordered list can be used:
All text belonging to a list item must be typed on the same line.
Nesting of lists is possible by using multiple digits or multiple asterisks. An example:
* a 11. a.a 11. a.b 111. a.b.a 111. a.b.b 111. a.b.c **** a.b.c.a **** a.b.c.b **** a.b.c.c 111. a.b.d *** a.b.e 11. a.c * b * c
Rendering result:
Links to other pages are created by putting the page name enclosed in square brackets. To rename an internal link, specify the name to show enclosed in %|%.
Below are two examples of internal links. The first one will be shown with the page name, the second one is renamed:
[Tcl and Tk] and [Tcl and Tk%|%Tcl/Tk%|%]
Rendering result:
Tcl and Tk and Tcl/Tk
Internal links to image pages will show the image.
A link to the list of pages referencing a certain page can be specified like this:
[backrefs:Tcl]
Rendering result:
Links can be added to any of the following protocols:
The following extension are recognized as links to images:
An external link is rendered as specified, unless followed by a new name enclosed in %|%. Some examples:
External link: https://nikit.tcl-lang.org/_edit/Help Renamed external link: https://nikit.tcl-lang.org/_edit/Help%|%Tcler's Wiki%|% External link to image: https://www.tcl-lang.org/images/plume.png Renamed external link to image: https://www.tcl-lang.org/images/plume.png%|%Plume%|%
Rendering result:
External link: https://nikit.tcl-lang.org/_edit/Help
Renamed external link: Tcler's Wiki
External link to image: https://www.tcl-lang.org/images/plume.png
Renamed external link to image: Plume
When an external link to an image is enclosed in square brackets the image itself is shown i.s.o. a link to the image. When an external link to a non image is enclosed in square brackets, the link is rendered as a numerical link enclosed in square brackets. Some examples:
External link: [https://nikit.tcl-lang.org/_edit/Help] Renamed external link: [https://nikit.tcl-lang.org/_edit/Help%|%Tcler's Wiki%|%] External link to image: [https://www.tcl-lang.org/images/plume.png] Renamed external link to image: [https://www.tcl-lang.org/images/plume.png%|%Plume%|%]
Rendering result:
External link: [L1 ]
Renamed external link: Tcler's Wiki
External link to image:
Renamed external link to image:
To insert a list of all pages referencing the current page use this line:
<<backrefs>>
Rendering result:
To insert a list of all pages referencing a specific pages use this line:
<<backrefs:page name>>
Rendering result:
Insert the table of contents of the page using this line:
<<toc>>
Rendering result:
Insert the message of the day (taken from page ADMIN:MOTD) using this line:
<<motd>>
Rendering result:
Tcl Community News
Insert an overview of recent changes using this line:
<<changes>>
Rendering result:
December 01, 2024 | UTC | Swatch Internet Time |
November 30, 2024 | Proposal of syntax, expressiveness and semantic improvements with annotations |
November 29, 2024 | My Little TextFile Parser | Scrollutil | tablelist | Mentry | Wcb |
November 28, 2024 | lpttcl | Frank Bannon |
To redirect a page to another pages, put this redirect statement on the first line of a page:
<<redirect>> target page name
The redirect can be annotated with a reason why the redirect was done. This reason will be show on top of the target page. Possible annotations are:
<<redirect redundant>> target page name <<redirect duplicate>> target page name <<redirect merged>> target page name <<redirect inaccurate>> target page name
A table row is specified as a line starting and ending with a pipe (|) sign. Each row element is separated with a pipe sign too. A header row start with %| and end with |%. To color even and odd rows differently, start rows with &| and end them with |&. An example:
%| Row 1 | Row 2 | Row 3 |% &| a | b | c |& &| d | e | f |& &| a | b | c |& &| d | e | f |&
Rendering result:
Row 1 | Row 2 | Row 3 |
---|---|---|
a | b | c |
d | e | f |
a | b | c |
d | e | f |
To use a pipe sign in a row element, specify it as:
<<pipe>>
The above syntax requires full table rows to be specified on a single line. This following alternative syntax allows rows element to be specified line per line. A line only containing a + sign marks the beginning of a row. Following lines starting with a | sign specify row element. A line containing only +% specifies a header row. To color even and odd rows differently, specify a row using a line containing only +&. An example:
+% |a |b |c +& |d |e |f +& |g |h |i
Rendering result:
a | b | c |
---|---|---|
d | e | f |
g | h | i |
A discussion is hidden by default and can be made visible by clicking the associated button. A discussion is started with a line containing:
<<discussion>>
optionally followed by a name. The discussion will contain all content up to the end discussion markup:
<<enddiscussion>>
or the next discussion line or if no other discussion is started, up to the end of the page.
This Wiki has a category or tag system. A page can be categorized or tagged like this:
<<categories>>tag1|tag2|tag3 <<tags>>tag1|tag2|tag2
Different tags can be separated by a pipe sign. A tag is page name. If the other page name starts with Category the word Category can be omitted in the tagging. If the specified tag does not start with Category, the wiki will still first look for a page with that name but starting with Category. If such a page can not be found, the plain tag name will be used to link to.