next up previous [pdf]

Next: Bibliography Up: Creating reproducible documentation Previous: Creating reproducible documentation

Example

This paper by itself is an example of a reproducible document. It is generated using the following SConstruct file which is place in the directory above the projects directories.

This SConstruct generates this paper but it can also compile velan.tex in the same directory. Note that there is no Paper command for paper.tex since it is the default documentation name. Optional LATEX packages and style used in paper.tex are passed in the End command.

Let's now have a closer look at paper.tex to understand how the figures of the documentation are linked to the reproducible scripts that created them. First of all, note that paper.tex is not a regular LATEX document but only its body (no $\backslash$documentclass, $\backslash$usepackage, etc.). In our paper, Fig. 2 was created in the project folder easystart (sub-folder of our documentation folder) by the result plot lena.vpl. In the LATEX source code, it translates as

The $\backslash$inputdir command points to the project directory and the $\backslash$sideplot command calls $<$result_name$>$. The LATEX tag of the figure is fig:$<$result_name$>$. The first time the paper is compiled, the result file is automatically converted to the PDF file format.


next up previous [pdf]

Next: Bibliography Up: Creating reproducible documentation Previous: Creating reproducible documentation

2012-07-19