简体   繁体   English

使用R友好的Sweave或其他LaTeX(例如PDF生成器)进行主题化

[英]Theming with Sweave or other LaTeX like PDF Generators that are R friendly

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. 我每月都会生成一些报告,在这些报告中,我使用R来生成文本,表格和图像。 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. 但是现在,我陷入了将信息复制粘贴到MS Publisher的麻烦中,将文本放在主题文档中,由我们的图形设计师为我们制作。

What I'd like to do is replicate the design, and get rid of the need to copy paste. 我想做的就是复制设计,并摆脱复制粘贴的需要。

Is this possible with Sweave? 使用Sweave是否可以? Or another tool? 还是其他工具?

You have 3 choices: 您有3个选择:

As Roman says, you can create a .sty file to replicate the theme in your Latex output. 正如罗曼所说,您可以创建一个.sty文件来在乳胶输出中复制主题。

You could also tinker with the R2wd package to make it work with Publisher. 您也可以修改R2wd软件包以使其与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. 第三种方法是使用R2HTML将您的内容输出为网页,然后将该HTML文件导入Publisher。

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. 或者,您可以尝试使用odfweave ,它允许您使用与Sweave相似的方式创建带有R代码,表格和图形的Libre Office (nee Open Office).odf文档。 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. 它们之间有一些区别,并且在某些方面,因为您可以在gui中编辑odf文档,所以对于业余爱好者来说更容易。

Libre Office/Open Office also allows you to save the resulting odf document as a word document (or many other formats). Libre Office / Open Office还允许您将生成的odf文档另存为word文档(或许多其他格式)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM