Doku supports some simple markup language, which tries to make the datafiles to be as readable as possible. This page contains all possible syntax you may use when editing the pages. Simply have a look at the source of this page by pressing “[Edit this page]“.
Doku supports bold, italic and underlinded text. Of course, you can combine all these attributes.
*
.
* This is a list
* The second item
* You may have different levels
* Another item
==Source:==
<code>
* This is a list
* The second item
* You may have different levels
* Another item
</code>
===== Tables =====
Doku supports a simple syntax to create tables.
^ Heading 1 ^ Heading 2 ^ Heading 3 ^
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
| Row 2 Col 1 | some colspan (note the double pipe) ||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |
Table rows have to start and end with a |
for normal rows or a ^
for headers.
==Source:==
^ Heading 1 ^ Heading 2 ^ Heading 3 ^
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
| Row 2 Col 1 | some colspan (note the double pipe) ||
| Row 3 Col 1 | Row 3 Col 2 | Row 3 Col 3 |
To connect cells horizontally, just make the next cell completely empty as shown above. Be sure to have always the same amount of cell separators!
===Vertical Titles===
Vertical titles are possible too.
| ^ Heading 1 ^ Heading 2 ^
^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 |
^ Heading 4 | no colspan this time | |
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 |
As you can see, it's the cell separator before a cell which decides about the formatting:
==Source:==
| ^ Heading 1 ^ Heading 2 ^
^ Heading 3 | Row 1 Col 2 | Row 1 Col 3 |
^ Heading 4 | no colspan this time | |
^ Heading 5 | Row 2 Col 2 | Row 2 Col 3 |
===Rowspan===
You can have rowspans (vertically connected cells) by adding :::
into the cells below the one to which they should connect.
^ Heading 1 ^ Heading 2 ^ Heading 3 ^
| Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 |
| Row 2 Col 1 | ::: | Row 2 Col 3 |
| Row 3 Col 1 | ::: | Row 2 Col 3 |
Apart from the rowspan syntax those cells should not contain anything else.
==Source:==
^ Heading 1 ^ Heading 2 ^ Heading 3 ^
| Row 1 Col 1 | this cell spans vertically | Row 1 Col 3 |
| Row 2 Col 1 | ::: | Row 2 Col 3 |
| Row 3 Col 1 | ::: | Row 2 Col 3 |
===Column Alignment===
You can align the table contents, too. Just add at least two whitespaces at the opposite end of your text: Add two spaces on the left to align right, two spaces on the right to align left and two spaces at least at both ends for centered text.
^ Table with alignment ^^^
| right| center |left |
|left | right| center |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
This is how it looks in the source:
==Source:==
^ Table with alignment ^^^
| right| center |left |
|left | right| center |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
Note: Vertical alignment is not supported.
===Maximum Width===
The table can be expanded to the maximum available width. To do so, add ”~~~”
to one of the table rows.
^ Table with alignment ^^^~~~
| right| center |left |
|left | right| center |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
==Source:==
^ Table with alignment ^^^~~~
| right| center |left |
|left | right| center |
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
===== Code Blocks =====
You can include code blocks into your documents by either indenting them by at
least two spaces (like used for the previous examples) or by using the tags
“<code>” or “<file>”.
This is text is indented by two spaces.
<code>
This is preformatted code all spaces are preserved: like ←this
</code>
===== Embedding Code =====
You can embed raw source code into your documents by using the “<code>” tag.
==example:==
<code>
#include <iostream>
using namespace std;
int main(){
int n, t1 = 0, t2 = 1, nextTerm = 0;
cout « “Enter the number of terms: ”;
cin » n;
cout « “Fibonacci Series: ”;
for (int i = 1; i ⇐ n; ++i){
Prints the first two terms.
if(i == 1){
cout « “ ” « t1;
continue;
}
if(i == 2){
cout « t2 « “ ”;
continue;
}
nextTerm = t1 + t2;
t1 = t2;
t2 = nextTerm;
cout « nextTerm « “ ”;
}
return 0;
}
</code>
==== Downloadable Code Blocks ====
When you use the “<code>” syntax as above, you might
want to make the shown code available for download as well. You can do this by
specifying a file name after language code like this:
<code fibonacci.cpp>
#include <iostream>
using namespace std;
int main(){
int n, t1 = 0, t2 = 1, nextTerm = 0;
cout « “Enter the number of terms: ”;
cin » n;
cout « “Fibonacci Series: ”;
for (int i = 1; i ⇐ n; ++i){
Prints the first two terms.
if(i == 1){
cout « “ ” « t1;
continue;
}
if(i == 2){
cout « t2 « “ ”;
continue;
}
nextTerm = t1 + t2;
t1 = t2;
t2 = nextTerm;
cout « nextTerm « “ ”;
}
return 0;
}
</code>
===== No Formatting =====
If you need to display text **exactly** like it is typed (without any
formatting), enclose the area either with “".
==Source:==
If you need to display text exactly** like it is typed (without any
formatting), then enclose it with "”.