主题,模板的用途,并包含在以R降价生成的投影仪演示中 [英] Purposes of theme, template and includes in beamer presentation generated with R markdown

查看:47
本文介绍了主题,模板的用途,并包含在以R降价生成的投影仪演示中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具有输出格式 beamer 的R markdown演示文稿可以使用

R markdown presentations with output format beamer can make use of

  • 经典的LaTex投影仪主题 ,例如哥本哈根马德里,或使用自定义的投影仪主题.
  • 模板,即 template.tex
  • 包含,例如 in_header:preamble.tex before_body:before_body.tex after_body:after_body.tex
  • Classical LaTex beamer themes such as Copenhagen or Madrid or employ custom beamer themes.
  • Templates , i.e. a template.tex
  • Includes, e.g. in_header: preamble.tex, before_body: before_body.texand after_body: after_body.tex

可以通过YAML标头在 rmarkdown :: beamer_presentation 中实现,如下所示:

which can be implemented in the rmarkdown::beamer_presentation through the YAML-header as follows:

theme: "THEMENAME"
template: template.tex
includes:
  - in_header: preamble.tex
  - before_body: before_body.tex
  - after_body: after_body.tex

这些文件的具体用途是什么?也就是说,这些文件中的每个文件应包含哪些内容,它们如何添加或修改最终的显示形式,以及哪些文件是等效文件并且可能是多余的文件?

What are the specific purposes of these files? That is, what contents should go in each of these files, how do they add or modify the final presentation, and which of the files are equivalent and possibly redundant?

推荐答案

  • 如果我正确理解rmarkdown术语,他们会使用术语模板作为说明,以了解如何将markdown文档转换为tex,例如例如,默认的beamer_presentation模板定义了如何在tex文档中使用yaml-header中的信息,例如无论您放置标题的什么内容,都将被翻译成 \ title {...} .默认情况下,它还包含一个由rmarkdown加载的程序包的小孔厨房水槽,其中的许多内容对于Beamer来说都是没有意义的.

    • If I understand the rmarkdown lingo correctly, they use the term template for the instructions how the markdown document will be translated into tex, e.g. the default beamer_presentation template for example defines how information from your yaml-header is used in the tex document, e.g. that whatever you put down for title will be translated into \title{...}. It also contains a hole kitchen sink of packages rmarkdown loads by default, many of which make no sense with beamer.

      include挂钩提供了将其他乳胶代码走私到您的文档中的可能性.不同选项之间的区别在于它们将在中间tex文档中执行的位置.例如, in_header 将包含在序言的末尾.使用哪一个取决于您要添加的内容.对于大多数事情, in_header 都可以.

      the include hooks offer possibilities to smuggle additional latex code into your document. The difference between the different options is where they will be executed in the intermediate tex document. For example in_header will be included at the end of the preamble. Which of them to use will depend on what you want to add. For most things in_header will be fine.

      这篇关于主题,模板的用途,并包含在以R降价生成的投影仪演示中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆