2013-08-25 21:34:45 +02:00
|
|
|
#########
|
|
|
|
Example 1
|
|
|
|
#########
|
|
|
|
|
|
|
|
:purpose: demonstrate basic rst processing
|
|
|
|
|
2013-08-26 01:57:29 +02:00
|
|
|
Static SVG Picture
|
|
|
|
##################
|
|
|
|
|
2013-08-25 21:34:45 +02:00
|
|
|
.. figure:: test.svg
|
|
|
|
:align: center
|
|
|
|
:width: 50%
|
|
|
|
|
|
|
|
This is a static svg file
|
|
|
|
|
2013-08-26 01:57:29 +02:00
|
|
|
Generated PNG Picture
|
|
|
|
#####################
|
|
|
|
|
2013-08-25 21:34:45 +02:00
|
|
|
.. figure:: test.png
|
|
|
|
:align: center
|
|
|
|
:width: 50%
|
|
|
|
|
|
|
|
This figure is a png file generated
|
|
|
|
(in the build folder of course).
|
|
|
|
|
|
|
|
As of 2013-08-25, rst2pdf and docutils do not have
|
|
|
|
some way of specifying include paths, in which includes
|
|
|
|
are searched.
|
|
|
|
So the figure is broken.
|
|
|
|
We could generate the figure in the source directory,
|
|
|
|
but I prefer not having a figure at all for the sake
|
|
|
|
of cleanleness.
|
2013-08-26 01:57:29 +02:00
|
|
|
A docutils patch is available here though:
|
|
|
|
http://zougloub.eu/git/overlay-zougloub/plain/dev-python/docutils/files/docutils-0.11-search-path.patch
|
|
|
|
|
2013-08-25 21:34:45 +02:00
|
|
|
|
2013-08-26 01:57:29 +02:00
|
|
|
Generated rst Content
|
|
|
|
#####################
|
2013-08-25 22:35:49 +02:00
|
|
|
|
|
|
|
.. include:: generated.rst
|
|
|
|
|
2013-08-26 01:57:29 +02:00
|
|
|
Generated CSV Content
|
|
|
|
#####################
|
|
|
|
|
|
|
|
As of 2013-08-25, waf doesn't scan the csv-table directive
|
|
|
|
including an external file. You'll have to specify
|
|
|
|
the dependency manually, use build groups, or count on your luck.
|
|
|
|
|
2013-08-25 23:01:28 +02:00
|
|
|
.. csv-table::
|
|
|
|
:file: generated.csv
|
|
|
|
|
2013-08-26 01:57:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Generated Content using raw Directive
|
|
|
|
#####################################
|
|
|
|
|
|
|
|
The following line will be empty if not using the HTML
|
|
|
|
output.
|
|
|
|
|
2013-08-25 23:01:28 +02:00
|
|
|
.. raw:: html
|
|
|
|
:file: generated.html
|
2013-08-25 22:35:49 +02:00
|
|
|
|
2013-08-26 01:57:29 +02:00
|
|
|
Did you see something?
|
|
|
|
|
|
|
|
As of 2013-08-25, waf doesn't scan the raw directive
|
|
|
|
including an external file. You'll have to specify
|
|
|
|
the dependency manually, use build groups, or count on your luck.
|
|
|
|
|