Contents (hide) 1 Headers
9 Links
9.1 Wiki Links
9.3 Internal Links
9.4 External links
10 Macros
11 Hebrew
12 Special
12.1 Unformatted
12.2 Code
12.3 Secure block
12.4 HTML support
12.5 Comments
12.6 Fancy Widgets
12.7 Slide Show
13.1 Wiki Include
13.2 Wiki Tree
13.3 Blog Links
14 LaTeX
16 Graphviz
|
CSWML: Text Formatting
CSWML (CsWiki Markup Language) is language for formatting wiki pages. Its similar to HTML, but has some useful extentions.Headers
<h1>Header 1</h1> or =Header 1= <h2>Header 2</h2> or ==Header 2== <h3>Header 3</h3> or ===Header 3=== <h4>Header 4</h4> or ====Header 4====
If page has more than 5 headers, table of content will be added automaticaly.
To prevent header appearance in table of content, add notoc="true"
attribute
to <h1> ... <h4>
.
To prevent table of content, add <notoc/>
element to your page.
To show table of content, add <showtoc/>
element to your page.
Line Breaks
-----
or more minuses makes horizontal line
<br>
– same as in HTML
\\
– same as in LaTeX
Two or more newlines in text produces a new paragraph (same as in LaTeX):
First paragraph. The second one.result:
The second one.
Text decorations
<i>italic</i> <b>bold</b> <u>underline</u>A<sup>x</sup> A<sub>y</sub>
<small>small</small> <big>big</big>
Escape Characters
Use\
to mask characters like < or > with special meaning in HTML or Wiki syntax.
Character \
itself is \
(\\
is used for line breaks).
Additional Symbols
You can use HTML and unicode entities:«Coöperation»
>
produces
«Coöperation»
Some shortcuts
-
--
makes – (–) -
---
makes — (—) -
...
makes (&cdots;) -
<==
and==>
makes ← and → (←, →)
More entities examples.
Unordered Lists
<ul> <li>Item 1 <li>Item 2 </ul>or
(*>) (*)Item 1 (*)Item 2 (<*)produces:
- Item 1
- Item 2
Ordered Lists
<ol> <li> Item 1 <li> Item 2 </ol>or
(#>) (#) Item 1 (#) Item 2 (<#)produces:
- Item 1
- Item 2
Definition lists
<dl> <dt>Dweeb <dd>young excitable person who may mature into a <em>Nerd</em> or <em>Geek</em> <dt>Hacker <dd>a clever programmer <dt>Nerd <dd>technically bright but socially inept person </dl>produces:
- Dweeb
- young excitable person who may mature into a Nerd or Geek
- Hacker
- a clever programmer
- Nerd
- technically bright but socially inept person
Links
[[ ... ]]
makes links.
Wiki Links
Wiki name can include spaces, so if you write[[just another wiki page]]
its actuall name is Just_Another_Wiki_Page
but presentation will be kept: just another wiki page.
This Wiki supports multi level page hierarchy. Level defined by / or . in page names.
For example:
[[Help/TextFormatting]]
– makes TextFormatting to be under Help page.
Alternatively, text after | sign will be link name :
[[Help/TextFormatting|text formatting help]]
– text formatting help
Broken links have different desing: Wiki broken page and by clicking to link you can create this page (if you have enough permissions).
Links to Uploaded Files
You can create link to uploaded file by[[file:file_name]]
.
If file is image, you can use
[[image:image_file_name]]
to include image to the page.
You can use [[image:http://some.domain/image.jpg]]
in order to create external image.
Internal Links
Sometimes you need extra navigation in a long pages. You can use for that internal anchors.
Use <span id="some-id"></span>
for define anchor,and [[PageName#some-id|link to some id]]
is for link
to the anchor (for same page you can use [[#some-id|link to some id]]
).
External links
[[http://www.google.com]]
– http://www.google.com [[http://www.google.com|Google homepage]]
– Google homepage
[[somebody@host.com]]
–
[[somebody@host.com|mail to]]
–
There is also posibility to make HTML links :
<a href="http://www.yahoo.com">Yahoo!</a>
[[ ... ]]
syntax.
Macros
Call wiki macro using{{WikiMacro(arg1,arg2,arg3,...)}}
.
See Macros page for more information.
Hebrew
<heb> זאת פסקה בעברית </heb>
Special
Unformatted
<nowiki> ... </nowiki>
is for unformatted text (without wiki syntax).
Code
<code>...</code>
tag is for inline or paragraph unformatted text with program code, file content etc.
It hase two modes:
- inline:
du -a . | sort -n
- or multiline:
cd /tmp touch z.out
@@ ... @@
short form.
<code lang="java">...</code>
is for highlighted source code presentation:
- import java.sql.*;
- public class Zopa{
- public static void main(String[]args){
- System.out.println(new String("Zopa"+100));
- }
- }
lang="..."
property).
To prevent numbering use numbers="false"
attribute.
To define filename for code piece, use filename="<file name>"
attribute.
For long code pieces use close="true"
attribute.
External code source
Code element acceptssrc="..."
attribute and inserts external content into code block.
Source can be:
- uploaded wiki file name
- some url
Example:
<code src="http://path/to/file.java" lang="java" />
Secure block
<secure> ... </secure>
is for restricted area
$WIKI_DENIED
in include/config.php
.
Secure section
If you have whole section(s) under secure block, like this:<secure> =Section Header= ... </secure>and you click to edit only this section, you will get next code in edit window:
=Section Header= ... </secure>Do not remove "unclosed" section tag, leave it as-is.
HTML support
Almost all HTML tags and Javascript are supported (except base, basefont, bgsound, blink, body, frame, frameset, head, ilayer, link, meta, style, title, html)Example:
<table class="border"> <tr><td>HTML table cell with <input type="button" value="button" onclick="window.alert(\'Click!\')"/></td></tr> </table>
HTML table cell with |
Comments
Tags<!-- ... -->
and /* ... */
are for comments.
Fancy Widgets
<widget>...</widget>
tag used for small floating table with title and content.
Attributes:
-
title="<some title>"
adds title to the top of the widget. -
float="right|left"
controls on floating of widget. -
width="<some width>"
controls on width of widget. Format is125px
for 125 pixels,10em
for 10 longest font letters,15%
for relative width. -
border_color="<some color>"
controls on border color.
Example:
<widget title="Hello!" float="left"> Hello all !!! <br> [[http://www.google.com/search?hl=en&q=hello|hello@google]] </widget> Look at your left !!!
Makes this :
Hello! |
Hello all !!! hello@google |
<br class="clear"/>
Slide Show
Tags<slideshow>
and <slide>
used for javascript-driven slide show.
Example:
<slideshow width="75%"> <slide align="left"> This is <br/> <b>first</b> slide </slide> <slide align="center"> ... and this is <br/> <b>second</b> slide </slide> <slide align="right" title="last slide"> ... and finally<br/> <b>last</b> slide </slide> </slideshow>
Attributes for <slideshow>
:
-
width="<some width>"
– width for this slide show (default is 100%) -
align="(left|center|right)"
– align for this slide show (default center). If width is 100% each align case produce same result.
Attributes for
<slide>
:
-
align="(left|center|right)"
– text align for this slide (default is left) -
title="some text"
– optional top title for this slide (default is slide number)
<slide>
is active only under <slideshow>
tag.
Meta Wiki Commands
Wiki Include
[[include:Page]]
includes content of Page .
Beware of include loops in include.
Wiki Tree
[[tree:Page]]
builds tree of wiki pages where Page is their parent.
For example , [[tree:Main]]
produces this :
Blog Links
[[blog:user]]
, [[blog:user|some text]]
makes link to all blog posts of user.
[[blog:user|some text|tag=zopa]]
makes link to all blog posts of user tagged zopa.
LaTeX
<inmath>...</inmath>
or $$...$$
tags are for inline LaTeX formula (mathematics mode is opened).
For example: If $x \in \mathbb{Q}$ , x is natural number.
<math display="block">...</math>
is for LaTeX formulae block (LaTeX math mode does not opened by default).
Code
<math display="block"> \[\sum_{i=0}^{\infty} \frac{cos(n)}{n}\] </math>makes this:
There is also opportunity to add title (not too long) to LaTeX formula:
<math title="Product"> \[ \prod_{i=1}^N x_i \] </math>makes this:
Vertical Alignment for Inline LaTeX
Default vertival alignment for inline LaTeX images ismiddle
,
but you can change it using valign="..."
attribute in inmath
tag.
Example:
Here default formula <inmath>x \in \mathbb{Q}</inmath> ... and down <inmath valign="-50%">x \in \mathbb{Q}</inmath> ... and up <inmath valign="50%">x \in \mathbb{Q}</inmath>Here default formula $x \in \mathbb{Q}$ and down $x \in \mathbb{Q}$ and up $x \in \mathbb{Q}$
Read more about vertical alignment on W3C.
More about LaTeX : http://en.wikipedia.org/wiki/Help:Formula
GNUPlot graphs
You can add GNUplot graphs to page by this directive:
<plot> set title "Sample function" set samples 400, 400 plot [-10:10] real(sin(x)**besj0(x)) </plot>produces this

Graphviz
You can add Graphviz graphs to page by this directive<dot> digraph G {Hello->World} </dot>produces this

DOT Parameters
-
filter="some filter"
– filter can bedot
(default),neato
,twopi
,circo
,fdp
-
fontsize="10"
– defines default font size -
size="8,8"
– defines default edges size -
format="..."
– defines output format. Suported: png(default), svg.
man dot
for more information.
External Program Execution
<exec command="cat /etc/issue"/>
will execute command cat /etc/issue
and print its output (where html special characters are converted to its entities)
If you need write to standart input of external program, add text between <exec>
and </exec>
tags:
<exec command="perl"> foreach $f (1...5){ print $f," "; } </exec>
If you need command output asis, use format="raw"
attribute :
<exec command="some command" format="raw"/>