Markup_Mapping 

Fuego wiki

Login or create account

Markup Mapping

This page describes the mapping from tbwiki markup language to reStructuredText for the conversion of documentation to Sphynx and readthedocs. (see Issue_0046)

references [edit section]

mapping [edit section]

headers [edit section]


 item               |   tbwiki            |  reStructuredText
____________________|_____________________|____________________
                    |                     |
                    |                     | ##########
Page Title          |                     |  Title
                    |                     | ##########
____________________|_____________________|____________________
                    |                     |  =========
1st level heading   | = Heading 1 =       |  Heading 1
                    |                     |  =========
____________________|_____________________|____________________
                    |                     |
2nd level heading   | == heading 2 ==     |  Heading 2
                    |                     |  =========
____________________|_____________________|____________________
                    |                     |
3rd level heading   | === Heading 3 ===   |  Heading 3
                    |                     |  ---------
____________________|_____________________|____________________
                    |                     |
4th level heading   | ==== Heading 4 ==== |  Heading 4
                    |                     |  `````````
____________________|_____________________|____________________
                    |                     |

inline markup [edit section]


item             |   tbwiki          |  reStructuredText
_________________|___________________|____________________
                 |                   |
bold             |  '''bold'''       |   **bold**
                 |                   |
italic           |  ''italic''       |   *italic*
                 |                   |
external link    |  http://foo       |   http://foo
                 |                   |
heading anchor   | (automatic)       |  .. _name:
                 |                   | (automatic with sphinx.ext.autosectionlabel configured)
                 |                   |
                 |                   |
explicit anchor  | {{HTML(<a name="#<name></a>)}} | .._name:
                 |                   |
                 |                   |
                 |                   |
page link        |  [[Page Name]]    |  :ref:`page_name`
                 |                   |   (can refer to a label in an external file,
                 |                   |   file, but not the entire file itself)
                 |                   |
bullet           |   * item          | * item
                 | (first level must | (first level must follow an empty line)
                 |  be indented)     |
                 |                   |
dir or filename  | ``filename``      | ``filename``
                 |                   |
command          | 'command'         | ``command``
                 |(no markup, but    |
                 | convention was    |
                 | single quotes)    |

other items (definition lists) [edit section]

item             |   tbwiki           |  reStructuredText
_________________|____________________|____________________
                 |                    |
definition       | ; term: definition | term
                 |                    |   definition description
                 |                    |
                 |                    |   use same indent to continue
                 |                    |

blocks and quoted [edit section]


item         |   tbwiki                       |  reStructuredText
_____________|________________________________|____________________
             |                                |
block        | {{{                            | previous paragraph
             |    indented                    |    indented
             |      content                   |      content
             | }}}                            | previous indentation level
_____________|________________________________|____________________
             |                                |
             |                                | .. note:: content in
colored      | {{{#!YellowBox                 |    note block
block        |     content                    | .. tip:: content in
             | }}}                            |    note block (also warning:, error: important: caution:)
             |                                |
             |                                |  last part of preceding paragraph ::
             |                                |
             |                                |     stuff in block
_____________|________________________________|____________________
             |                                |
labeled      |                                |
offset block |  (not available)               | .. note:: content in note block
_____________|________________________________|____________________
             |                                |

links [edit section]

note labels and anchors are case-insensitive in rst.

By convention, explicit declarations of labels are lower case.

item         |   tbwiki                       |  reStructuredText
_____________|________________________________|____________________
             |                                |
URL          | http://example.com/            | http://example.com/
_____________|________________________________|____________________
             |                                |
URL with     | [[http://example.com|Example]] | `Example http://example.com/`_
cover text   |                                |
_____________|________________________________|____________________
             |                                |
internal     | [[#Section Name]]              | `section_name`_
_____________|________________________________|____________________
             |                                |
page         | [[Page Name]]                  | :ref:`page_name`_
_____________|________________________________|____________________
             |                                |
define       | (not available)                | .. _new_label:
anchor       |                                |
_____________|________________________________|____________________
             |                                |
define       | (not available)                | `Example`_
URL separate |                                |     ...
from cover   |                                |
text         |                                | .. _Example: http://example.com/
             |                                |
_____________|________________________________|____________________
             |                                |

Macros and directives [edit section]

item         |   tbwiki                       |  reStructuredText
_____________|________________________________|____________________
             |                                |
include      | {{Include(page-or-ref)}}       | .. include: included-file.txt
_____________|________________________________|____________________
             |                                |

TBWiki engine 1.8.3 by Tim Bird