目錄表

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 :

<h1> being already used for the blog title, and <h2> for entry titles, it is recommend to only use <h3> or more within the entries.

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>

wiki :

Corresponding xhtml :

Images

wiki :

The position can be called L (for left) or R (for right) or C (centered).

Corresponding xhtml :

Anchor

wiki : ~anchor~

Corresponding xhtml : <a name=“anchor”></a>

Acronym

wiki : ??acronym|title??

Corresponding xhtml : <acronym title=“title”>acronym</acronym>

Inline quotation

wiki :

Corresponding xhtml :

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>
  ///


Going further