Skip to content

Instantly share code, notes, and snippets.

@ashander
Created October 22, 2012 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ashander/3933701 to your computer and use it in GitHub Desktop.
Save ashander/3933701 to your computer and use it in GitHub Desktop.
Example of producing Tufte latex from knitr Rmd. Use knit('tufteknitr.Rmd') in R, then mmd2pdf tufteknitr.md at command prompt.
latex input: mmd-tufte-handout-header
Title: Tufte latex from Rmd example
Base Header Level: 2
latex mode: memoir
author: Jaime Ashander
copyright: 2011 Jaime Ashander
This work is licensed under a Creative Commons License.
http://creativecommons.org/licenses/by-nc-sa/3.0/
latex input: mmd-natbib-plain
latex input: mmd-tufte-handout-begin-doc
latex footer: mmd-tufte-footer
`r opts_chunk$set(message=FALSE, warning=FALSE, cache=FALSE)`
```{r startup, echo=TRUE, fig.cap="Figure caption"}
plot(0,0)
```
This statement is footnoted[^fn].
[^fn]: Pointlessly.
The "Newest Synthesis" is part of the title of a recent article[#ref1].
[#ref1]: Schoener 2011 _Science_
@ashander
Copy link
Author

Note I had to charge through an error (below) to get a pdf from commands listed above in description.

! LaTeX Error: Cannot determine size of graphic in figure/startup.png (no Bound
ingBox).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment