【问题标题】:Edit title slide of R Markdown Slidy Presentation编辑 R Markdown Slidy Presentation 的标题幻灯片
【发布时间】:2015-06-18 16:44:43
【问题描述】:

有没有办法编辑 R Markdown Slidy Presentation 的标题幻灯片?我可以添加页眉、页脚和自定义 CSS:

title: "Slidy Template"
author: ""
date: "June 18, 2015"
runtime: shiny
output: 
  slidy_presentation:
    css: ./styles/Slidy_Styles.css
    includes:
      after_body: ./styles/doc_suffix.html
      before_body: ./styles/header.html

但我不知道如何在幻灯片中添加除标题、作者和日期之外的任何内容,或者使用自定义 html 模板替换标准的滑动标题幻灯片,就像我对页眉和页脚所做的那样。

有没有办法做到这一点?

【问题讨论】:

    标签: r-markdown slidy


    【解决方案1】:

    您可以修改pandoc中关于标题页的部分slidy template,也可以在pandoc -D slidy找到。

    $if(title)$
    <div class="slide titlepage">
      <h1 class="title">$title$</h1>
    $if(subtitle)$
      <h1 class="subtitle">$subtitle$</h1>
    $endif$
      <p class="author">
    $for(author)$$author$$sep$<br/>$endfor$
      </p>
    $if(date)$
      <p class="date">$date$</p>
    $endif$
    </div>
    $endif$
    

    将生成的文件保存为你的 pandoc 模板目录中的 default.slidy :

    $HOME/.pandoc/templates (unix)
    C:\Documents And Settings\USERNAME\Application Data\pandoc\templates (windows XP)
    C:\Users\USERNAME\AppData\Roaming\pandoc\templates (windows 7)
    

    【讨论】:

    • 谢谢!如果您将模板保存为 default.ioslides,这也适用于 iosolides
    【解决方案2】:

    如果您不提供标题,Rmarkdown 不会从滑动演示文稿中删除标题幻灯片。只需从 yaml 设置中删除标题行并添加第一张幻灯片以提供您喜欢的详细信息。

    author: ""
    date: "June 18, 2015"
    runtime: shiny
    output: 
      slidy_presentation:
        css: ./styles/Slidy_Styles.css
        includes:
          after_body: ./styles/doc_suffix.html
          before_body: ./styles/header.html
    ---
    #Slidy Template
    
    **Author**
    
    Affiliations
    
    Date
    ---
    

    【讨论】:

      猜你喜欢
      • 2022-11-29
      • 1970-01-01
      • 2019-04-11
      • 1970-01-01
      • 1970-01-01
      • 2017-12-26
      • 2018-08-05
      • 2020-09-21
      • 1970-01-01
      相关资源
      最近更新 更多