Skip to main content

History: Help - Basic Syntax

Source of version: 85 (current)

Copy to clipboard
            {BOX(class="Layout_box6",width="100%")}{CUT(colsize=5%|70%)}{img fileId="1750"}---{DIV(class="bigBold")}The Wiki Editing Basics{DIV}
Text formatting, headings, lists and other basic syntax.{CUT}{BOX}
{maketoc}
!Basic Syntax
{TRANSCLUDE(page="infobox")}{DIV(class="big")}All use of raw HTML has been turned off for the Ogre Wiki.{DIV}
Use Tiki syntax, ((Help - Wiki Plugins|wiki-plugins)), {ALINK(aname="Dynamic Variables")}dynamic variables{ALINK} and ((Wiki Styles|styles)) instead.{TRANSCLUDE}
{CUT()}
!!Formatting
|| __bold__ | {CODE()}__bold__{CODE}
''italic'' | {CODE()}''italic''{CODE}
--strikethrough-- | {CODE()}--strikethrough--{CODE}
===underlined=== | {CODE()}===underlined==={CODE} 
:::centered:::{FOOTNOTE()}Specific to Ogre Wiki: Two colons is normally used in Tiki syntax for center, but it conflicts with the resolution scope operator in C++, and it has thus been modified to be ::: (three colons).{FOOTNOTE} | {CODE()}:::centered:::{CODE}
~~maroon:coloured~~ | ~np~~~maroon:coloured~~~/np~
~~#ff00ff:also coloured~~ | ~np~~~#ff00ff:also coloured~~~/np~ ||
---
!!Lists
!!!Bullets
{CODE()}* item
* item
+ I am indented.
* item{CODE}
* item
* item
+ I am indented.
* item
!!!Numbered
{CODE()}# item
# item
+ I am indented.
# item{CODE}
# item
# item
+ I am indented.
# item
{CUT}

%note% You can also use the line break characters ({MONO()}__~np~%%%~/np~__{MONO}) to keep your text within the list:
{CODE()}* item%%%I am indented
* item{CODE}
* item%%%I am indented
* item

---
!Basic Syntax Using Plugins

!!Monospace
{CODE()}I am {MONO()}monospaced!{MONO}{CODE}
I am {MONO()}monospaced!{MONO}

!!Superscript
{CODE()}I am {SUP()}superscripted!{SUP}{CODE}
I am {SUP()}superscripted!{SUP}

!!Subscript
{CODE()}I am {SUB()}subscripted!{SUB}{CODE}
I am {SUB()}subscripted!{SUB}

!!Small text
{CODE()}%beginsmall% this is small text %endsmall%{CODE}
%beginsmall% this is small text %endsmall%

---
!Headings
Headings are formed by starting the line with one, two, or three exclamation marks ("!", "!!", or "!!!").

!!Toc and Maketoc
It's important to understand the difference between {MONO()}toc{MONO} and {MONO()}maketoc{MONO}:
{MONO()}~np~{maketoc}~/np~{MONO} will insert a table of contents into the page, using the headings.
{MONO()}~np~{toc}~/np~{MONO} is used to insert a list of child pages in a page in a structure.

!!!Maketoc
Clicking the Maketoc icon {IMG(src="pics/icons/book.png")}{IMG} on the toolbar will insert the {MONO()}~np~{maketoc}~/np~{MONO} tag into the page.
What it does is parse all the headings in the page and construct a Table Of Contents (TOC) out of them.

Tiki does not insert a TOC automatically - so you need to insert the tag if you want a TOC.
'''maketoc''' is short for '''Make a Table Of Contents'''.

{TRANSCLUDE(page="faqbox")}A table of contents is not automatically inserted into a page, like in MediaWiki!{TRANSCLUDE}

{TRANSCLUDE(page="seebox")}[http://doc.tikiwiki.org/PluginmakeToc]{TRANSCLUDE}


!!!Toc
'''toc''' will show a table of contents built from the titles of the pages within that structure of wiki pages.
Or put another way: will display a table of contents listing that page's sub-pages.
'''toc''' will not show anything if there's no sub-pages (children).
{CODE(caption="toc syntax",wrap="1")}{toc order= shownum= type= maxdepth= pagename=}{CODE}
|| {MONO()}order{MONO} | '''asc''' or '''desc''' - sort pagenames
{MONO()}shownum{MONO} | '''1''' or '''0''' - show numbering instead of bullets (default)
{MONO()}type{MONO} | '''plain''' or '''fancy''' - if '''fancy''' show the page descriptions
{MONO()}pagename{MONO} | the page to generate a toc for - default: current page ||
For instance, the following will show a toc for ((Ogre Wiki Help)), using type '''fancy''' to automatically show the page descriptions:
{CODE(caption="toc example syntax",wrap="1")}{toc pagename="Ogre Wiki Help" type=fancy}{CODE}
{toc pagename="Ogre Wiki Help" type=fancy}

{TRANSCLUDE(page="dobox")}Put a toc tag on a page, and any child pages you make from there on after will put a link to themselves automatically.
Do give your pages a description as it will turn up on the toc, if you set it to type '''fancy'''.
No more manually adding links! (:smile:){TRANSCLUDE}

{TRANSCLUDE(page="seebox")}[http://doc.tikiwiki.org/PluginToc]{TRANSCLUDE}
!!Normal headings
* {CODE()}!Level One{CODE}
* {CODE()}!!Level Two{CODE}
* {CODE()}!!!Level Three{CODE}

!!Numbered headings
* {CODE()}!# My Heading{CODE} will produce "1.0 My Heading"
* {CODE()}!!# My Secondary Heading{CODE} will produce "1.1 My Secondary Heading"
* {CODE()}!!!# My Tertiary Heading{CODE} will produce "1.1.1 My Tertiary Heading"

!!Collapsible headings
Putting a {MONO()}+{MONO} or a {MONO()}-{MONO} after the heading markers will make a collapsible heading section:
* {CODE()}!!!+Collapsible - Open{CODE}
!!!+Collapsible - Open
I am open
* {CODE()}!!!-Collapsible - Closed
I am closed
!!!{CODE}
!!!-Collapsible - Closed
I am closed
!!!

{TRANSCLUDE(page="bugbox")}If you want a collapsible section to stop, instead of globbing everything until it reaches the next heading (which it does by default), just insert an empty heading immediately following the collapsible heading.{TRANSCLUDE}

{TRANSCLUDE(page="dobox")}You can use the FADE wiki-plugin instead for collapsible sections:
{CODE(caption="FADE Syntax",wrap="1")}{FADE(label="Click Me!")}
This is hidden until you click '''Click Me!'''
{FADE}{CODE}
{FADE(label="Click Me!")}
This is hidden until you click '''Click Me!'''
{FADE}{TRANSCLUDE}

---
!Links

!!Internal Links
Links to wiki pages:
{CODE()}((Wiki)){CODE} will produce ((Wiki))

Links to wiki pages using a different name:
{CODE()}((Wiki|Wiki Home)){CODE} will produce ((Wiki|Wiki Home))

Section links (anchors):
{CODE()}((Wiki|#Sandbox|Wiki Sandbox Section)){CODE} will produce ((Wiki|#Sandbox|Wiki Sandbox Section))

Non-existing links:
((idonotexist))

{TRANSCLUDE(page="dontbox")}__Warning:__ Do not click on the create page link.
To create a new page, add a page to a structure, using the 'Add Page' textbox in the structure header.

While you *can* add the page to the structure later; save yourself the trouble.{TRANSCLUDE}
{TRANSCLUDE(page="dobox")}Add new pages from the structure header 'Add Page' textbox.
And use the {MONO()}~np~{toc}~/np~{MONO} tag to automatically create links to the new page(s).{TRANSCLUDE}

!!External Links
{CODE()}[http://www.ogre3d.org/]{CODE} becomes [http://www.ogre3d.org/]

{CODE()}[http://www.ogre3d.org/|Ogre Homepage]{CODE} becomes [http://www.ogre3d.org/|Ogre Homepage]

---
!Tables
Tables in Tiki are easy, although not very powerful, in it's basic form:
{CODE()}||hello | I am a simple
Tiki table
which is | easy to make
but fairly%%%limited ||{CODE}

||hello | I am a simple
Tiki table
which is | easy to make
but fairly%%%limited ||

It's syntax is two pipes ({MONO()}~np~||~/np~{MONO}) to start and end a table, and then each row is separated by a linebreak, and each column is separated by a pipe ({MONO()}~np~|~/np~{MONO}).

Due to linebreak being used as row separator, you need to use the indentation tag ({MONO()}~np~%%%~/np~{MONO}) if you want several lines of text in a cell.
See {ALINK(aname="Indentation")}Indentation{ALINK}.

If you need more control - formatting, sorting, etc. - do look into the FANCYTABLE plugin.

If you want to split up and arrange contents of a wiki page using tables, use the SPLIT and CUT plugins instead.

---
!Special Syntax

---
!!Using Square Brackets
Due to the square brackets being used for links, you need to escape the opening bracket if you want to display them as-is:
{CODE()}[[not a link]{CODE}
[[not a link]
If you don't escape it (by inserting an extra opening bracket), it will look like [not a link].

---
!!Non-breaking space
{CODE()}~hs~{CODE}

---
!!Comments
{CODE()}~t c~ this is a tiki comment ~/t c~{CODE}
Note: remove the space symbol between "t" and "c" (this was needed here to display the code)
''tc'' stands for ''Tiki comment''.
Use the {IMG(src="img/wiki_up/comment.png")}{IMG} button to quickly add a comment.

---
!!Plain Text (no parse)
{CODE()}~np~__not parsed__~/np~{CODE}
~np~__not parsed__~/np~

---
!!Simple Box
Surround some text with the {MONO()}~np~^~/np~{MONO} character to make a simple box:
{CODE()}^Text in a box^{CODE}
^Text in a box^

{TRANSCLUDE(page="bugbox")}Due to __{MONO()}~np~^~/np~{MONO}__ being used as the ''box-tag'' you need to escape any __{MONO()}~np~^~/np~{MONO}__ characters in your text (for example in math)!
Failure to do so will probably wreak havok on the page formatting when using more than one __{MONO()}~np~^~/np~{MONO}__.{TRANSCLUDE}
This is how the first sentence in the bug alert box looks like when not escaped:
;:''Due to __{MONO()}^{MONO}__ being used as the ''box-tag'' you need to escape any __{MONO()}^{MONO}__ characters in your text (for example in math)!''

---
!!Title
{CODE()}-=This is a title=-{CODE}
-=This is a title=-

---
!!Indentation
There's several ways of using indentation in Tiki

!!!Blockquote
This code:
{CODE()}not indented
;Title:indented text{CODE}
gives:
not indented
;Title:indented text

You can also indent without having a title:
{CODE()}not indented
;:indented text{CODE}
not indented
;:indented text

!!!Linebreak Tags (~np~%%%~/np~)
A section can be indented using the linebreak tags ( ~np~%%%~/np~ ) with the indent tags ( ~np~;:~/np~ ):
{CODE()}not indented
;:Lorem ipsum%%%and a lot of other%%%text in a blockquote{CODE}
not indented
;:Lorem ipsum%%%and a lot of other%%%text in a blockquote

!!!Indentation in tables
{CODE()}||one|two|three%%%and some line here%%%and another line
four|five%%%under five|six
seven|eight|nine||{CODE}
||one|two|three%%%and some line here%%%and another line
four|five%%%under five|six
seven|eight|nine||

The reason why the linebreak tag is needed in a table is that a normal linebreak starts a new row.

---
!!Video embedding
YouTube:
* Use YouTube button in page editor
Vimeo:
{CODE()}
{CODE(ishtml="1")}<iframe src="http://player.vimeo.com/video/123...." width="640" height="360" frameborder="0"></iframe>{CODE}
{CODE}

---
!Dynamic Variables
To save typing, and overcome the fact that HTML is turned off, this wiki uses Dynamic Variables.

A dynamic variable is surrounded by percentage characters:
{CODE()}%clear%{CODE}
A non-existing dynamic variable is rendered as __NAV__ (Not A Variable), and if you have the rights to do so, clicking NAV will allow you to enter some code, which can be either regular text or HTML.

The variables are stored directly into the database, so any non-visual dynamic variables need to be altered through the database interface (which is the case with the {MONO()}~np~%clear%~/np~{MONO} dynamic variable).

For instance, the {MONO()}~np~%clear%~/np~{MONO} dynamic variable is used to insert line breaks into a wiki page, and the code looks like this:
{CODE()}<br class="clear" />{CODE}
Other oft used dynamic variables are:
|| {MONO()}~np~%info%~/np~{MONO}| %info%
{MONO()}~np~%tutorialhelp%~/np~{MONO} | %tutorialhelp%
{MONO()}~np~%warning%~/np~{MONO} | %warning%
{MONO()}~np~%warning2%~/np~{MONO} | %warning2%
{MONO()}~np~%tip%~/np~{MONO} | %tip% ||
See ((Ogre Wiki Dynamic Variables)) for the full list.

---
!The Sandbox
{TRANSCLUDE(page="dobox")}Do use the ((Sandbox)) to practice your wiki edit skills!{TRANSCLUDE}
%clear%%clear%
---
{FOOTNOTEAREA()}{FOOTNOTEAREA}