I want to include latex packages in R markdown pdf and beamer.
我想在R markdown pdf和beamer中包含乳胶包。
Could you help me in including usepackage command in rmarkdown beamer file?
你能帮助我在rmarkdown beamer文件中包括usepackage命令吗?
Thanks a lot.
非常感谢。
2 个解决方案
#1
13
A simple solution would be to have your header setup like this:
一个简单的解决方案是让你的头设置如下:
---
title: "Document title"
author: "Author's name"
date: "Document date"
output: beamer_presentation
header-includes:
- \usepackage[brazil]{babel}
- \usepackage{graphicx}
- \usepackage[a4paper]{geometry}
---
#2
7
The YAML header of the Rmd would look like:
Rmd的YAML头应该是:
---
title: "Habits"
output:
pdf_document:
includes:
in_header: header.tex
---
Then, in the file header.tex, include any usepackage statements you need, eg. \usepackage{pdflscape}
然后,在文件头中。包括你需要的任何usepackage语句。\ usepackage { pdflscape }
See http://rmarkdown.rstudio.com/pdf_document_format.html for more information.
参见http://rmarkdown.rstudio.com/pdf_document_format.html获取更多信息。
#1
13
A simple solution would be to have your header setup like this:
一个简单的解决方案是让你的头设置如下:
---
title: "Document title"
author: "Author's name"
date: "Document date"
output: beamer_presentation
header-includes:
- \usepackage[brazil]{babel}
- \usepackage{graphicx}
- \usepackage[a4paper]{geometry}
---
#2
7
The YAML header of the Rmd would look like:
Rmd的YAML头应该是:
---
title: "Habits"
output:
pdf_document:
includes:
in_header: header.tex
---
Then, in the file header.tex, include any usepackage statements you need, eg. \usepackage{pdflscape}
然后,在文件头中。包括你需要的任何usepackage语句。\ usepackage { pdflscape }
See http://rmarkdown.rstudio.com/pdf_document_format.html for more information.
参见http://rmarkdown.rstudio.com/pdf_document_format.html获取更多信息。