Example of HOW-TO

[[mailto:marfin@mail.desy.de][]] :


For Docutils users & co-developers.


This document is a demonstration of the reStructuredText markup language, containing examples of all basic reStructuredText constructs and many advanced constructs. The topic is relevant for DESY Higgs group

Table of Contents

That's only EXAMPLE. Please, don't consider it seriously!

   Section First (stored in context)

   Section Title()

Just an example

1 gedit pohl.m
2 ./test.sh
3 printf "%s" "OK"

#include <iostream>
 void test() {
 return ;


1 #include <iostream>
2  void test() {
3  std::cout<<"test"<<std::endl;
4  return ;
6  }

def test():
""" test """
 print "How are you"?


   Section Second

   Bullet Lists

  • A bullet list * Nested bullet list.
  • Nested item 2.

  • Item 2.Paragraph 2 of item 2. * Nested bullet list.
  • Nested item 2. * Third level.
  • Item 2.

  • Nested item 3.

   Enumerated Lists

  • Arabic numerals. * lower alpha) * (lower roman) * upper alpha. * upper roman)

  • Lists that don't start at 1: * Three
  • Four

  • C
  • D

  • iii
  • iv

  • List items may also be auto-enumerated.

   Definition Lists


TermclassifierDefinition paragraph 1.

Definition paragraph 2.


   Section Third

   Literal Blocks

Literal blocks are indicated with a double-colon ("::") at the end of the preceding paragraph (over there -->). They can be indented:

if literal_block:
    text = 'is left as-is'
    spaces_and_linebreaks = 'are preserved'
    markup_processing = None

Or they can be quoted without indentation:

>> Great idea!
> Why didn't I think of that?

   Block Quotes

Block quotes consist of indented body elements:

My theory by A. Elk. Brackets Miss, brackets. This theory goes as follows and begins now. All brontosauruses are thin at one end, much much thicker in the middle and then thin again at the far end. That is my theory, it is mine, and belongs to me and I own it, and what it is too.

Anne Elk (Miss)


Here's a grid table followed by a simple table:

Header row, column 1 (header rows optional) Header 2 Header 3 Header 4
body row 1, column 1 column 2 column 3 column 4
body row 2 Cells may span columns.
|body row 3|Cells may span rows.| * Table cells
  • contain
  • body elements.


body row 4
body row 5 Cells may also be empty: -->

Inputs Output
A B A or B
False False False
True False True
False True True
True True True

   Section Fourth


CIT2002Citations are text-labeled footnotes. They may be rendered separately and differently from footnotes.

Here's a reference to the above, CIT2002 citation.


1A footnote contains body elements, consistently indented by at least 3 spaces.

This is the footnote's second paragraph.

2Footnotes may be numbered, either manually (as in 1) or automatically using a "#"-prefixed label. This footnote has a label so it can be referred to from multiple places, both as a footnote reference (2) and as a hyperlink reference (label).

3This footnote is numbered automatically and anonymously using a label of "#" only.

*Footnotes may also use symbols, specified with a "*" label. Here's a reference to the next footnote: *.

†This footnote shows the next symbol in the sequence.

   Section Fifth


This paragraph is pointed to by the explicit "example" target. A reference can be found under Section Second, above.

Section headers are implicit targets, referred to by name. See Targets.

Explicit external targets are interpolated into references such as "Python" or such as 4.


Targets may be indirect and anonymous. Thus this phrase may also refer to the Targets section.

   Section Sixth

   More details

you can find more details here 5 and here 6

5http://docutils.sourceforge.net/docs/user/rst/demo.txt http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.txt http://docutils.sourceforge.net/rst.txt


Good Luck!

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2013-03-02 - IgorMarfin
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback