source: pulse_train_doc/source/coaching1.rst @ 863

Last change on this file since 863 was 863, checked in by jemian, 10 years ago

properties

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 KB
Line 
1.. $Id: coaching1.rst 863 2012-06-05 07:20:49Z jemian $
2
3===========================================
4Coaching on the use of reStructuredText
5===========================================
6
7.. note:: Web documentation available at:
8   http://subversion.xor.aps.anl.gov/bcdaext/pulse_train_doc/build/html/index.html
9
10This is a just an example of writing the documentation using sphinx.
11It is easy.  You can find the built :index:`html` documentation in
12``build/html/index.html``.  To build the documentation, you need to
13be in the ``doc`` directory, then type::
14
15        make html
16
17It may be useful, sometimes, to completely :index:`rebuild` the documentation.
18To do that, type::
19
20        make clean
21        make html
22       
23SVN export this example documentation
24---------------------------------------
25
26You can pull this example from its subversion repo and add it
27to your project by going to the desired directory
28(perhaps the TOP directory for your support) and exporting from this
29subversion repository::
30
31   svn export http://subversion.xor.aps.anl.gov/bcdaext/pulse_train_doc sphinxdoc
32
33
34
35Example 1
36---------
37
38Here is some more text.
39
40  This text is an inset.
41
42
43Example 2
44---------
45
46Tell about example 2.
47
48inline code, external code, and other literal examples
49++++++++++++++++++++++++++++++++++++++++++++++++++++++
50
51Use a different underline symbol for each section :index:`level`.  To use
52``literal text``, surround test with double backticks or end a paragraph
53with a double colon::
54
55   place a blank line
56   then indent the text to be made to look like a program
57
58It is possible to include all or even part of code files in
59any accessible directory.
60
61.. code-block:: guess
62   :linenos:
63
64   # this is some example C code
65   for (i=10; i; i--)  i*i;
66
67.. literalinclude:: index.rst
68    :linenos:
69    :language: guess
70
71.. note:: More :index:`!help` is available from the sphinx
72   link (http://sphinx.pocoo.org/) at the bottom of this web page.
73
74UNIX Makefile
75+++++++++++++++
76
77.. literalinclude:: ../Makefile
78    :linenos:
79    :language: guess
80
81Indices and tables
82==================
83
84* :ref:`genindex`
85* :ref:`search`
86
Note: See TracBrowser for help on using the repository browser.