Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latex preamble in R Markdown

I have read several discussions and threads detailing how to add latex pre-amble to R markdown, but am yet to find an easy explanation of how to add latex pre-amble to Rmd files. I have templates in latex that I want to use in my Rmd's PDF and Beamer outputs.

I am having great difficulty in adding pre-amble arguments.

I tried:

in_header
<latex preamble>

as well as

%%
<preamble>
%%

But none seem to work.

Any solutions to someone experienced with latex, but far less with using rmd?

like image 224
Nick Avatar asked Feb 08 '23 18:02

Nick


1 Answers

Have you tried this?

---
title: "My Title"
author: "All of Us"
date: "Today, November 2, 2015"
output: 
  pdf_document
fontsize: 12pt
header-includes: \usepackage{graphicx, verbatim, fancyvrb, setspace, xspace, colortbl, longtable, amsmath, caption, xfrac, float, mathabx}
---

where you can include pieces in the "header-includes" portion?

like image 118
NotYourIPhone Siri Avatar answered Feb 11 '23 06:02

NotYourIPhone Siri