tags:

views:

108

answers:

2

Is there a way to generate a theme for sweave documents? I have a number of reports that I generate monthly, where I use R to generate the text, tables and images. But now I'm stuck in the rut of copying and pasting this information into MS Publisher placing the text in a themed document that we had a graphic designer make for us.

What I'd like to do is replicate the design, and get rid of the need to copy paste.

Is this possible with Sweave? Or another tool?

+3  A: 

You have 3 choices:

As Roman says, you can create a .sty file to replicate the theme in your Latex output.

You could also tinker with the R2wd package to make it work with Publisher. (This is likely nontrivial.)

The 'third way' is to use R2HTML to output your content as a web page, then import that HTML file into Publisher.

Richie Cotton
Thanks for the pointed to R2HTML!
Brandon Bertelsen
LaTex is really good for scientific documents and nice PDF output. But I think producing Html and make stylesheet to get the design right. Easier than to design your own Latex .sty.
Henrik
+1  A: 

Or, you could try odfweave which allows you to create an Libre Office (nee Open Office) .odf document with R code, tables and graphs in a similar way to Sweave. Their are a few difference, and in some ways because you can edit odf documents in a gui then it's easier to do for amateurs.

Libre Office/Open Office also allows you to save the resulting odf document as a word document (or many other formats).

PaulHurleyuk