Quick Look at ReStructuredText

Good source starter

A better source is the primer:

A ReStructuredText Primer
http://docutils.sourceforge.net/docs/user/rst/quickstart.html

My Super Short Introduction to reST

What I want to give is an absolute minimum that might get your writing in restructured text. You should not read my text, but look at the above reference! caveat emptor!

The title of a document is overlined and underlined with equals signs for the whole length of the title.

The First level heading is title underlined with equals signs. The second level heading is title underlined with minus signs. For many documents that is enough. Another lower level can be title underlined with dots.

All titles start at the left. The boxes are created by putting a colon pair :: followed by a blank line, then text offset say 4 spaces from the left. The block is finished by a blank line. The titles are also separated from text by blank lines. Blank lines are used rather freely.

This makes the source text easy to read, though its appearance takes some getting used to.

Checking the Draft

Seeing the text translated to pdf is the moment of truth. You must install sphinx. For ubuntu, the binary package is called python-sphinx. Go to your Synaptic Package Manager and install it.

Now make the directory with your perfectDocument.rst your current work directory and issue the command:

rst2pdf perfectDocument.rst

If the document is more or less OK, this command will produce perfectDocument.pdf. Look at it and if you are satisfied, your first try is a success. Treat yourself to your favourite drink!

I will spell check this my document and try its conversion to pdf. As I use kubunty natty 11.04, I will have a look at it by opening the pdf in Okular viewer. If necessary, I will then edit this source file.

Algis Kabaila 2011-08-05

Table Of Contents

Previous topic

Super Short Sphinx Tutorial

Next topic

Using Sphinx to Make Web Pages

This Page