diff --git a/playground/rst/test1.rst b/playground/rst/test1.rst index fc466d7e..5c5f7d89 100644 --- a/playground/rst/test1.rst +++ b/playground/rst/test1.rst @@ -4,12 +4,18 @@ Example 1 :purpose: demonstrate basic rst processing +Static SVG Picture +################## + .. figure:: test.svg :align: center :width: 50% This is a static svg file +Generated PNG Picture +##################### + .. figure:: test.png :align: center :width: 50% @@ -20,19 +26,44 @@ Example 1 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. + A docutils patch is available here though: + http://zougloub.eu/git/overlay-zougloub/plain/dev-python/docutils/files/docutils-0.11-search-path.patch +Generated rst Content +##################### + .. include:: generated.rst +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. + .. csv-table:: :file: generated.csv + + + +Generated Content using raw Directive +##################################### + +The following line will be empty if not using the HTML +output. + .. raw:: html :file: generated.html +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. + diff --git a/playground/rst/test2.rst b/playground/rst/test2.rst index 84a8d738..554f39bd 100644 --- a/playground/rst/test2.rst +++ b/playground/rst/test2.rst @@ -4,10 +4,42 @@ Example 2 :purpose: demonstrate rst processing through rst2latex +Generated PDF Picture +##################### + .. figure:: test.pdf :align: center :width: 50% - This is a generated pdf file + This figure shows a pdf file that was auto-generated + (test.pdf). + +Generated PNG Picture +##################### + +.. figure:: test.png + :align: center + :width: 50% + + This figure shows a pdf file that was auto-generated + (test.png). + +Generated rst Content +##################### + + +.. include:: generated.rst + +Generated CSV Content +##################### + +.. csv-table:: + :file: generated.csv + +Generated LaTeX Content (raw Directive) +####################################### + +.. raw:: latex + :file: generated.tex diff --git a/playground/rst/wscript b/playground/rst/wscript index fd2a1b49..f3f03a56 100644 --- a/playground/rst/wscript +++ b/playground/rst/wscript @@ -57,6 +57,11 @@ def build(bld): target=x.change_ext('.pdf'), ) + bld( + target='generated.tex', + rule=lambda tsk: Utils.writef( tsk.outputs[0].abspath(), "Generated contents in %s" % tsk.outputs[0].name), + ) + bld( features='rst', type='rst2latex',