Table of Contents
GandiBlog: Text formating
You can write entries using wiki or xhtml syntax. You will need to determine the default syntax in your user preferences. You can choose to select a different syntax for a specific entry by choosing the text format thanks to the scrolling menu in the right-hand column.
The short description below is also available from the entry editing interface, by clicking the next to the type of text formating.
Wiki syntax reference
The wiki syntax is a way to enhance your text with a minimal set of tags, studied to cover the basic needs (titles, paragraphs, quotes, lists…). These tags are then interpreted by the blog and converted into xhtml. If you do not master xhtml perfectly and don't use the WYSIWYG mode, it is strongly recommended to use wiki in order to avoid any error which could generate malfunctions in the blog's display.
Block elements
Blocks
wiki : Leave an empty line between two similar blocks.
Corresponding xhtml : <p>The first paragraph.</p></p>The second paragraph.</p>
Titles
wiki : !!! title, !! title or ! title for titles of lesser importance
Corresponding xhtml :
- !!!!!Title →
<h1>Title</h1>
- !!!!Title →
<h2>Title</h2>
- !!!Title →
<h3>Title</h3>
- !!Title →
<h4>Title</h4>
- !Title →
<h5>Title</h5>
Horizontal line
wiki : —- (four dashes, alone, on one single line)
Corresponding xhtml : <hr />
Lists
wiki : lines beginning by * for bullet point lists or # for numbered lists.
You can mesh lists together by mixing list codes. For example :
* item 1 ** item 1.1 ** item 1.2 * item 2 * item 3 *# item 3.1 ...
Corresponding xhtml for the above example :
<ul> <li>item 1 <ul> <li>item 1.1</li> <li>item 1.1</li> </ul></li> <li>item 2</li> <li>item 3 <ol> <li>item 3.1</li> </ol></li> </ul>
Preformated text
wiki : A space before each line of text.
Corresponding xhtml : <pre>preformated lines of text </pre>
Block quote :
wiki : >
before each line of text.
Corresponding xhtml : <blockquote><p>The quote's paragraphs.</p></blockquote>
Formating elements
Emphasis
wiki : two apostrophes
''text''
Corresponding xhtml : <em>text</em>
Strong emphasis :
wiki : two underscores
__text__
Corresponding xhtml : <em>text</em>
New line
wiki :
text.%%%
Corresponding xhtml : <br />
Insertion
wiki : two pluses
++text++
Corresponding xhtml : <ins>text</ins>
Deletion
wiki : two dashes
--text--
Corresponding xhtml : <del>text</del>
Links
wiki :
- [url]
- [name|url]
- [name|url|language]
- [name|url|language|title]
Corresponding xhtml :
<a href=“url-target”>url-target</a>
<a href=“url-target”>name</a>
<a href=“url-target” lang=“en”>name</a>
<a href=“url-target” lang=“en” title=“titre”>name</a>
Images
wiki :
((url|alternative text))
((url|alternative text|position))
((url|alternative text|position|long description))
The position can be called L (for left) or R (for right) or C (centered).
Corresponding xhtml :
<img src=“url” alt=“alternative text” />
<img src=“url” alt=“alternative text” style=“display:block; float:left; margin:0 1em 1em 0” />
(if position : L)<img src=“url” alt=“alternative text” style=“display:block; float:right; margin:0 0 1em 1em” longdesc=“long description” />
(if position : R)
Anchor
wiki : ~anchor~
Corresponding xhtml : <a name=“anchor”></a>
Acronym
wiki : ??acronym|title??
Corresponding xhtml : <acronym title=“title”>acronym</acronym>
Inline quotation
wiki :
{{quotation}}
{{quotation|language}}
{{quotation|language|url}}
Corresponding xhtml :
<q>quotation</q>
<q lang=“en”>quotation</q>
<q lang=“en” cite=“url”>quotation</q>
Code
wiki : @@code here@@
Corresponding xhtml : <code>code here</code>
Footnotes
wiki : text$$Note body$$
Corresponding xhtml :
text<sup>[<a href="url-blog#pnote-xxx-x" id="rev-pnote-xxx-x">x</a>]</sup> (...) <div class="footnotes"><h4>Notes</h4> <p>[<a href="blog-url/#rev-pnote-xxx-x" id="pnote-xxx-x">x</a>] Note body</p></div>
Complementary
Unformatted text
To insert a character without it being recognized as a formatting character, add a backslash ( \ ) in front of it. For example : \[text in brackets which isn't a link\]
Inserting HTML code within the wiki syntax
You may punctually need to insert HTML code within your wiki-formatted text. To do so, use the following code and leave a blank line before and after the insertion:
///html <p style="color:red">my red text</p> ///