.. _topics-syntax:

===========
Wiki Syntax
===========

.. admonition:: About this document

   This document provides a brief summary of the syntax used to edit wiki
   pages.

.. contents::
   :depth: 3

The softwarefabrica wiki engine uses an extended `Markdown`_ syntax.

See `syntax-markdown`_ for a brief overview of the Markdown syntax.

.. _`Markdown`: http://daringfireball.net/projects/markdown/syntax

.. _wiki-specific:

Wiki specific
=============

Wiki links
----------

It's possible to use the classic *CamelCase* links::

    CamelCase

It's also possible to use a specific syntax, which allows to specify a link title::

    [[LinkTarget|Link title]]

The link title is not mandatory though::

    [[LinkTarget]]

It's possible to link to attachments::

    [[attachment:Attachment|Attachment title]]

.. _syntax-markdown:

Markdown
========

This is only a quick reference.

For more details, see the complete `Markdown syntax`_.

.. _`Markdown syntax`: http://daringfireball.net/projects/markdown/syntax

Headers
-------

::

    # Level one header
    ## Level two header
    ### Level three header
    ...
    ###### Level six header

Paragraphs
----------

::

    Paragraphs can
    span multiple lines.
    
    To start a new paragraph use one or more empty lines.

Paragraphs can
span multiple lines.

To start a new paragraph use one or more empty lines.

Emphasis
--------

::

    **bold**

**bold**

::

    *italic*

`italic`

Lists
-----

Unordered lists use \*, \+ or \-

Ordered lists use a number followed by period. There is no need to use different numbers.

An unordered list
~~~~~~~~~~~~~~~~~

::

    - Item 1
    - Item 2
    - Item 3
    - - Subitem 1
    - - Subitem 2

- Item 1
- Item 2
- Item 3
- - Subitem 1
- - Subitem 2

An ordered list
~~~~~~~~~~~~~~~

::

    1. ordered list item 1
    2. item 2
    - you only need to put the first '1.' then each subsequent item can be as in an unordered list
    - item 4

1. ordered list item 1
2. item 2
3. you only need to put the first '1.' then each subsequent item can be as in an unordered list
4. item 4

List items may consist of multiple paragraphs. Each subsequent paragraph in a list item must be indented by either 4 spaces or one tab:

::

    1.  This is a list item with two paragraphs. Lorem ipsum
        dolor sit amet, consectetuer adipiscing elit. Aliquam
        hendrerit mi posuere lectus.
    
        Vestibulum enim wisi, viverra nec, fringilla in,
        laoreet vitae, risus. Donec sit amet nisl. Aliquam
        semper ipsum sit amet velit.
    
    2.  Suspendisse id sem consectetuer libero luctus
        adipiscing.

1.  This is a list item with two paragraphs. Lorem ipsum
    dolor sit amet, consectetuer adipiscing elit. Aliquam
    hendrerit mi posuere lectus.

    Vestibulum enim wisi, viverra nec, fringilla in,
    laoreet vitae, risus. Donec sit amet nisl. Aliquam
    semper ipsum sit amet velit.

2.  Suspendisse id sem consectetuer libero luctus
    adipiscing.

Images
------

::

    ![sfwiki logo](/static/images/logo-medium.png "logo")

reference style::

    ![sfwiki logo][logo]

    [logo]: /static/images/logo-small.png "logo"

Code
----

Indent text at least 4 spaces for representing it as a literal block::

    ...
    ...

        def mul(a, b):
            "A simple Python function"
            return a * b
    
    ...

Inline text is ``escaped`` with backticks::

    Inline text is `escaped` with backticks

Links
-----

::

    [Markdown syntax](http://daringfireball.net/projects/markdown/syntax)

`Markdown syntax`_

Or using reference style::

    [Markdown syntax][mds]

    [mds]: http://daringfireball.net/projects/markdown/syntax

`Markdown syntax`_

.. _`Markdown syntax`: http://daringfireball.net/projects/markdown/syntax

Quoting
-------

::

    > some block quoted text
    >> some block quoted text

Horizontal line
---------------

Three or more dashes::

    ---

Escaping
--------

To prevent the application of the markdown syntax, preceed special characters with a backslash::

    This is \*\*not\*\* in bold. 

This is \*\*not\*\* in bold.
