Skip to content

Instantly share code, notes, and snippets.

@kenjisato
Created March 21, 2017 11:06
Show Gist options
  • Save kenjisato/3a88e24f3823c9b9a7da494aad24b64b to your computer and use it in GitHub Desktop.
Save kenjisato/3a88e24f3823c9b9a7da494aad24b64b to your computer and use it in GitHub Desktop.
Rmd to LaTeX without preamble
---
title: title
author: author
output: html_document
---
# Section header
Body text goes here.
```{r pressure, echo=FALSE, dev=c('pdf', 'png')}
plot(pressure)
```
\section{Section header}\label{section-header}
Body text goes here.
\begin{figure}[htbp]
\centering
\includegraphics{figure/pressure-1.pdf}
\caption{plot of chunk pressure}
\end{figure}
knitr::knit("child.Rmd")
rmarkdown::pandoc_convert("child.md", to = "latex", output = "child.tex")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment