How to use latex packages in R markdown beamer?

I want to include latex packages in R markdown pdf and beamer.

Could you help me include the usepackage command in the rmarkdown beamer file?

Many thanks.

+7
latex r-markdown beamer
source share
2 answers

A simple solution would be to set your title as follows:

--- title: "Document title" author: "Author name" date: "Document date" output: beamer_presentation header-includes: - \usepackage[brazil]{babel} - \usepackage{graphicx} - \usepackage[a4paper]{geometry} --- 
+11
source share

The YAML header for Rmd will look like this:

 --- title: "Habits" output: pdf_document: includes: in_header: header.tex --- 

Then, in the header.tex file, specify any instructions you need for usepackage, for example. \usepackage{pdflscape}

See http://rmarkdown.rstudio.com/pdf_document_format.html for more details.

+7
source share

All Articles