Repository navigation
Expand file tree
/
Copy pathREADME.Rmd
More file actions
152 lines (101 loc) · 4.44 KB
/
Copy pathREADME.Rmd
File metadata and controls
152 lines (101 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[](https://travis-ci.org/coatless/uiucthemes)[](http://www.r-pkg.org/pkg/uiucthemes) [](https://cran.r-project.org/package=uiucthemes)
# UIUC Themes for R Markdown (`uiucthemes`)
The **uiucthemes** package includes my collection of UIUC themed templates.
Presently, only the UIUC Beamer Theme is embedded within the package.
## UIUC Beamer Theme - Example
Within an `RMarkdown` file, add the following:
```yaml
---
title: "UIUC Beamer Theme"
short-title: "Beamer Slides"
author: "John and Mary Doe"
short-author: "J & M Doe"
date: '`r format(Sys.Date(), "%B %d, %Y")`' # Month DD, YYYY (Main Slide)
short-date: '`r format(Sys.Date(), "%m/%d/%Y")`' # MM/DD/YYYY (Lower Right)
institute: "University of Illinois at Urbana-Champaign"
short-institute: "UIUC"
department: "Department of Magic" # Institute must be defined
license: "Did you license this slide deck? "
section-titles: false # Provides slide headings
safe-columns: true # Enables special latex macros for columns.
output:
uiucthemes::uiuc_beamer
---
# Section title
## Subsection title
### Frame Title
Frame content
**Unordered List**
- [University of Illinois at Urbana-Champaign (UIUC)](http://illinois.edu)
- [Department of Statistics](http://www.stat.illinois.edu/)
- [Illinois Informatics Institute](http://www.informatics.illinois.edu/)
*Ordered List*
1. <http://thecoatlessprofessor.com>
2. <http://smac-group.com>
#### Title for block box
Content inside of a box
### \LaTeX
\begin{exampleblock}{Binomial Theorem}
\begin{equation}
f\left(k\right) = \binom{n}{k} p^k\left(1-p\right)^{n-k}
\label{eq:binom}
\end{equation}
\end{exampleblock}
Hello Equation \ref{eq:binom}
### Redux \LaTeX
This theme supports special LaTeX macros `\beingcols` and `\endcols` that allows
for markdown to be blended with LaTeX without triggering the [`raw_tex`](http://pandoc.org/MANUAL.html#raw-tex)
extension. To enable this feature, the `safe-columns` key in the YML head matter
must be set equal to `true`.
\begincols
\column{.49\linewidth}
- _Hello!_
\column{.49\linewidth}
1. **Goodbye!**
\endcols
```
**Note: You will also need to save the [`ilogo.pdf` file](https://github.com/coatless/uiucthemes/blob/master/inst/rmarkdown/templates/uiuc_beamer/skeleton/ilogo.pdf) to the folder with the RMarkdown document**. The need for this is negated under the instructions given at the end (RStudio creation & using `rmarkdown::draft()`.
This generates:

## Materials Referenced
- [Custom Document Templates](http://rmarkdown.rstudio.com/developer_document_templates.html) / [Custom Formats](http://rmarkdown.rstudio.com/developer_custom_formats.html)
- [Beamer Presentation Format](http://rmarkdown.rstudio.com/beamer_presentation_format.html)
- [Beamer Pandoc Template](https://github.com/jgm/pandoc-templates/blob/master/default.beamer)
- [`rticles` An R Package](https://github.com/rstudio/rticles)
### Prerequisites
- LaTeX Distribution
- Windows: <http://miktex.org/download>
- Mac: <http://tug.org/mactex/mactex-download.html>
### Using `uiucthemes` from RStudio
To use **uiucthemes** from RStudio:
1) Install the latest [RStudio](http://www.rstudio.com/products/rstudio/download/).
2) Install the **uiucthemes** package:
```r
install.packages("devtools")
devtools::install_github("rstudio/rmarkdown")
devtools::install_github("coatless/uiucthemes")
```
3) Use the **New R Markdown** dialog to create an article from one of the templates:

### Using `uiucthemes` outside of RStudio
1) Install [pandoc](http://johnmacfarlane.net/pandoc/) using the [instructions for your platform](https://github.com/rstudio/rmarkdown/blob/master/PANDOC.md).
2) Install the **rmarkdown** and **uiucthemes** packages:
```r
install.packages("devtools")
devtools::install_github("rstudio/rmarkdown")
devtools::install_github("coatless/uiucthemes")
```
3) Use the `rmarkdown::draft` function to create articles:
```r
rmarkdown::draft("slide_deck.Rmd", template = "uiuc_beamer", package = "uiucthemes")
```