中心ppt幻灯片标题

时间:2015-06-24 23:57:59

标签: r powerpoint reporters

使用ReporteRs包我们可以从R代码创建power point presenation。 我尝试创建一个具有居中标题的power point幻灯片。

这里是我用来创建幻灯片的基本代码:

library( ReporteRs )
mydoc = pptx( ) # try adding argument: template = 'template.pptx' here
mydoc = addSlide( mydoc, "Title and Content" )
mydoc = addTitle( mydoc, "This is a title" )
writeDoc( mydoc, "pp_simple_example.pptx" )

这会创建一个标题位于左侧的幻灯片。遗憾的是,addTitle不会公开任何参数来格式化文本或更改其位置。我也查看了包装选项:

 options()[grep('ReporteRs',names(options()))] 

但没有成功。

1 个答案:

答案 0 :(得分:4)

一种解决方案是使用预定义的模板(如下面的问题所述) 要创建模板:

  1. 创建演示文稿
  2. 选择文本居中的模板。您可以添加带有文本的虚拟幻灯片,并从预定义主题(设计选项卡)中选择一个
  3. 不要忘记取下幻灯片。并将演示文稿另存为basic_template.ppx
  4. 现在在R代码中使用此模板:

    mydoc = pptx( template='basic_template.pptx') ## give the whole path here