本文介绍了编辑 R Markdown Slidy Presentation 的标题幻灯片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

title: "滑动模板"作者: ""日期:2015 年 6 月 18 日"运行时间:闪亮输出:slidy_presentation:css: ./styles/Slidy_Styles.css包括:after_body: ./styles/doc_suffix.htmlbefore_body: ./styles/header.html

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

有没有办法做到这一点?

解决方案

可以修改pandoc中关于标题页的部分slidy 模板,也可以通过 pandoc -D slidy 找到.

$if(title)$<div class="幻灯片标题页"><h1 class="title">$title$</h1>$if(字幕)$<h1 class="subtitle">$subtitle$</h1>$endif$<p class="作者">$for(author)$$author$$sep$<br/>$endfor$</p>$if(日期)$<p class="date">$date$</p>$endif$

$endif$

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

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

Is there a way to edit the title slide of a R Markdown Slidy Presentation? I am able to add the header, footer, and custom 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

But I can't figure out how to either add anything besides title, author, and date to the slide, or else replace the standard slidy title slide with a custom html template, like I do with the header and footer.

Is there a way to do this?

解决方案

You can modify the part about title page in the pandoc slidy template, also found with 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$

Save the resulting file as default.slidy in your pandoc template directory :

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

这篇关于编辑 R Markdown Slidy Presentation 的标题幻灯片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 21:18