ReStructuredText (rst): plain text markup

The tiny table of contents

1   What is reStructuredText?

An easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system, abbreviated rst. In other words, using a simple text editor, documents can be created which

2   What is it good for?

reStructuredText can be used, for example, to

3   Show me some formatting examples

You can highlight text in italics or, to provide even more emphasis in bold. Often, when describing computer code, we like to use a fixed space font to quote code snippets.

We can also include footnotes [1]. We could include source code files (by specifying their name) which is useful when documenting code. We can also copy source code verbatim (i.e. include it in the rst document) like this:

int main ( int argc, char *argv[] ) {
    printf("Hello World\n");
    return 0;
}

We have already seen at itemised list in section What is it good for?. Enumerated list and descriptive lists are supported as well. It provides very good support for including html-links in a variety of ways. Any section and subsections defined can be linked to, as well.

4   Where can I learn more?

reStructuredText is described at http://docutils.sourceforge.net/rst.html. We provide some geeky small print in this footnote [2].

5   Show me some more stuff, please

We can also include figures:

image.png

The magnetisation in a small ferromagnetic disk. The diametre is of the order of 120 nanometers and the material is Ni20Fe80. Png is a file format that is both acceptable for html pages as well as for (pdf)latex.


[1]although there isn't much point of using a footnote here.
[2]

Random facts:

  • Emacs provides an rst mode
  • when converting rst to html, a style sheet can be provided (there is a similar feature for latex)
  • rst can also be converted into XML
  • the recommended file extension for rst is .txt