====== GRT Doku Syntax ====== **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]"**. ===== Basic Text Formatting ===== **Doku** supports **bold**, //italic// and __underlinded__ text. Of course, you can **__//combine//__** all these attributes. ==Source:== **Doku** supports **bold**, //italic// and __underlinded__ text. Of course, you can **__//combine//__** all these attributes. **Paragraphs** are created from blank lines. If you want to **force a newline** without a paragraph, you can use two backslashes followed by a whitespace or the end of line. This is some text with some linebreaks\\ Note that the two backslashes are only recognized at the end of a line\\ or followed by\\ a whitespace \\this happens without it. ==Source:== This is some text with some linebreaks\\ Note that the two backslashes are only recognized at the end of a line\\ or followed by\\ a whitespace \\this happens without it. You should use forced newlines only if really needed. ===== Colors ===== **Doku** supports colored text. RGB color codes in the format //#RRGGBB// or the color names can be used. If an adjustable color scheme is available, e.g. in programs, also the names of the respective color schemes can be used. ==Source:== **Doku** supports colored text. RGB color codes in the format //#RRGGBB// or the color names can be used. If an adjustable color scheme is available, e.g. in programs, also the names of the respective color schemes can be used. ==Color codes (Names)== | red | lightred | darkred | | green | lightgreen | darkgreen | | blue | lightblue | darkblue | | orange | lightorange | darkorange | | grey | lightgrey | darkgrey | | yellow | lightyellow | darkyellow | | magenta | lightmagenta | darkmagenta | | cyan | lightcyan | darkcyan | | black | | white | ===== Text Size ===== **Doku** supports different text sizesin the text. The size specification can be in percent, or also with fixed size. The text sizes can also be nested. ==Source:== **Doku** supports different text sizesin the text. The size specification can be in percent, or also with fixed size. The text sizes can also be nested. ===== Text to special characters ===== **Doku** can convert certain pre-defined character-combinations for typography replacements: -> <- <-> => <= <=> >> << -- --- (c) (tm) (r) ==Source:== -> <- <-> => <= <=> >> << -- --- (c) (tm) (r) ===== Links ===== **Doku** supports multiple ways of creating links. Links are created by using square brackets. ==== External ==== External links are recognized if a internet url [[http://www.google.com|This Link points to google]]. Email addresses like this one: [[your@mail.address]] are recognized, too. ==Source:== External links are recognized if a internet url [[http://www.google.com|This Link points to google]]. Email addresses like this one: [[your@mail.address]] are recognized, too. ==== Internal ==== You can either just give a [[pagename]] or use an additional [[pagename|link text]]. ==Source:== You can either just give a [[pagename]] or use an additional [[pagename|link text]]. Pagenames are converted to lowercase automatically, special characters are not allowed. You can use some namespaces by using a colon ":" in the pagename path. The first element is the two-char ISO-language code, e.g. "en" for english. Wihtout a language code, the current selected language from the index page is used. Links to [[doku:start|existing pages]] are shown in a different style from [[nonexisting]] ones. ===== Footnotes ===== You can add footnotes ((This is a footnote)) by using double parentheses. ==Source:== You can add footnotes ((This is a footnote)) by using double parentheses. ===== Sectioning ===== You can use up to five different levels of headlines to structure your content. ====== Headline Level 1 ====== ===== Headline Level 2 ===== ==== Headline Level 3 ==== === Headline Level 4 === == Headline Level 5 == ==Source:== ====== Headline Level 1 ====== ===== Headline Level 2 ===== ==== Headline Level 3 ==== === Headline Level 4 === == Headline Level 5 == By using four dashes, you can make a horizontal line: ---- ===== Images and Other Files ===== * **Images** are bound with the curly brackets. Optionally, the size of the image can be specified. * **If a file name** is specified that does not point to an image ("png, jpg, jpe, jpeg, gif, bmp"), a download link is created: download link with a {{file:://the/path/to/file.zip}} ====Size==== Original size: {{doku:dokulogo.png}} {{doku:dokulogo.png}} With specification of a width: {{doku:dokulogo.png?80}} {{doku:dokulogo.png?80}} With specification of a percentage width.\\ The percentage value here refers to the to the current page width: {{doku:dokulogo.png?15%}} {{doku:dokulogo.png?15%}} With new width and height: {{doku:dokulogo.png?100x50}} {{doku:dokulogo.png?100x50}} ====Linking==== * **To create a link**, the additional parameter **"link "** is expected. External images are displayed after a click on the linked image with the standard image viewer of your operating system. For internal or dynamically generated images, a temporary file is created for display. If a URL is specified, the URL is opened. Original with link to the original image: {{doku:dokulogo.png?link}} {{doku:dokulogo.png?link}} With new width and link to the original image: {{doku:dokulogo.png?100&link}} {{doku:dokulogo.png?70&link}} With new width and link to a URL: {{doku:dokulogo.png?100&link=https://google.com}} {{doku:dokulogo.png?70&link=https://google.com}} ====Alignment==== The alignment is controlled by spaces added to the left and/or right, where other elements flow around the image, it may be necessary to insert line breaks. Align left {{doku:dokulogo.png?100 }} {{doku:dokulogo.png?100 }} Align right {{ doku:dokulogo.png?100}} {{ doku:dokulogo.png?100}} Inline {{doku:dokulogo.png?100}}{{doku:dokulogo.png?100}}{{doku:dokulogo.png?100}} {{doku:dokulogo.png?100}}{{doku:dokulogo.png?100}}{{doku:dokulogo.png?100}} ===== Lists ===== **Doku** supports lists. To create a list item, indent your text by two or a multiple of two spaces and a asterix ''*''. * This is a list * The second item * You may have different levels * Another item ==Source:== * This is a list * The second item * You may have different levels * Another item ===== 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 "%%%%" or "%%%%". This is text is indented by two spaces. This is preformatted code all spaces are preserved: like <-this ===== Embedding Code ===== You can embed raw source code into your documents by using the "%%%%" tag. ==example:== #include 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; } ==== Downloadable Code Blocks ==== When you use the "%%%%" 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: #include 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; } ===== 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 "%%".