【问题标题】:Center ppt slide title中心ppt幻灯片标题
【发布时间】:2015-06-24 23:57:58
【问题描述】:

使用ReporteRs 包,我们可以从 R 代码创建演示文稿。 我尝试创建一个具有居中标题的幻灯片。

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

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()))] 

但没有成功。

【问题讨论】:

  • 查看文档 (davidgohel.github.io/ReporteRs/powerpoint.html#UIDOGY85lT7OO),您似乎可以通过为其提供一个模板来完成此操作,该幻灯片模板具有您想要的已定义位置。
  • @BrandonBertelsen 谢谢。看起来很有趣。即使我没有看到是否有复制现有幻灯片或更新现有幻灯片的重复功能。
  • 我在您的问题代码中添加了注释,我相信您可以在其中指定模板。

标签: r powerpoint reporters


【解决方案1】:

一种解决方案是使用预定义的模板(正如我的问题下方所评论的那样) 创建模板:

  1. 创建演示文稿
  2. 选择文本居中的模板。您可以添加带有文本的虚拟幻灯片,然后从预定义的主题中选择一个(“设计”选项卡)
  3. 别忘了取下幻灯片。并将演示文稿另存为basic_template.ppx

现在在 R 代码中使用这个模板:

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

【讨论】:

    猜你喜欢
    • 2023-02-10
    • 2019-11-15
    • 2011-02-27
    • 2010-12-03
    • 2019-01-18
    • 2022-08-21
    • 2020-09-24
    • 2011-12-25
    • 1970-01-01
    相关资源
    最近更新 更多