LaTeX [http://www.latex-project.org/] is a typesetting system that can easily be
used to create reports and scientific articles, and has excellent formatting
options for displaying code and mathematical formulas. Sweave
[http://www.statistik.lmu.de/%7Eleisch/Sweave/] is a package in base R that can
execute R code