-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
136 lines (101 loc) · 3.76 KB
/
README.Rmd
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
```{r, echo=FALSE, include=FALSE}
## Get VERSION and create file names
ver <- sub(x=grep(x=readLines("DESCRIPTION"), pattern="^Version: ",
value=TRUE),
pattern="^Version: ", replacement="")
pkg.name <- "legtheme_"
pkg.source <- paste0(pkg.name, ver, ".tar.gz")
pkg.win <- paste0(pkg.name, ver, ".zip")
```
# legtheme `r ver`
[![Build Status](https://travis-ci.org/leg-ufpr/legtheme.svg?branch=master)](https://travis-ci.org/leg-ufpr/legtheme)
LEG template for documents.
## Usage
After installing (sse below), you can create a draft document from one
of the themes available:
- `beamer_leg` is a theme for beamer slides
- `proj_generico` is a theme for a generic project or any other similar
document in PDF
To create a draft for `beamer_leg` use:
```{r, eval=FALSE}
library(rmarkdown)
draft(file = "slides.Rmd", template = "beamer_leg",
package = "legtheme", create_dir = FALSE, edit = FALSE)
```
This will create (in the current directory) a file named `slides.Rmd`
which can be further rendered with
```{r, eval=FALSE}
render("slides.Rmd")
```
Similarly, to create a draft document for the `proj_generico` theme,
just use:
```{r, eval=FALSE}
draft(file = "proj.Rmd", template = "proj_generico",
package = "legtheme", create_dir = FALSE, edit = FALSE)
render("proj.Rmd")
```
## Download and install
The easiest way to install is directly from this repository with the
**remotes** (or **devtools**) packages
```{r, eval=FALSE}
remotes::install_github("leg-ufpr/legtheme")
```
In any case, there are detailed instructions below for different
plataforms.
### Linux/Mac
Use the `remotes` package (available from
[CRAN](http://cran-r.c3sl.ufpr.br/web/packages/remotes/index.html)) to
install automatically from this GitHub repository:
```{r, eval=FALSE}
library(remotes)
install_github("leg-ufpr/legtheme")
```
Alternatively, download the package tarball: [`r pkg.source`][]
and run from a UNIX terminal (make sure you are on the container file
directory):
```{r, echo=FALSE, comment=NA}
cmd <- paste("R CMD INSTALL -l /path/to/your/R/library", pkg.source)
cat(cmd, sep = "\n")
```
Or, inside an `R` session:
```{r, echo=FALSE, comment=NA}
inst <- paste0("install.packages(", "\"", pkg.source, "\"", ", repos = NULL,\n",
" lib.loc = \"/path/to/your/R/library\",\n",
" dependencies = TRUE)")
cat(inst, sep = "\n")
```
Note that `-l /path/to/your/R/library` in the former and `lib.loc =
"/path/to/your/R/library"` in the latter are optional. Only use it if
you want to install in a personal library, other than the standard R
library.
### Windows
Download Windows binary version: [`r pkg.win`][] (**do not unzip
it under Windows**), put the file in your working directory, and from
inside `R`:
```{r, echo=FALSE, comment=NA}
instw <- paste0("install.packages(", "\"", pkg.win, "\"", ", repos = NULL,\n",
" dependencies = TRUE)")
cat(instw, sep = "\n")
```
## Authors
- Original [theme](https://github.com/coatless/uiucthemes)
(`uiucthemes`) by [James L. Balamuta](https://github.com/coatless)
- LEG theme adaptation by:
- [Fernando de Pol Mayer][]
## Documentation
The reference manual in PDF can be found here: [legtheme-manual.pdf][]
## License
MIT. See [LICENSE](./LICENSE)
<!-- links -->
```{r, echo=FALSE, include=FALSE}
pkg.source.link <- paste0(
"https://github.com/leg-ufpr/legtheme/raw/master/downloads/",
pkg.source)
pkg.win.link <- paste0(
"https://github.com/leg-ufpr/legtheme/raw/master/downloads/",
pkg.win)
```
[`r pkg.source`]: `r pkg.source.link`
[`r pkg.win`]: `r pkg.win.link`
[legtheme-manual.pdf]: https://github.com/leg-ufpr/legtheme/raw/master/downloads/legtheme-manual.pdf
[Fernando de Pol Mayer]: http://www.leg.ufpr.br/~fernandomayer