To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit fdf07e0d authored by lorenzwalthert's avatar lorenzwalthert
Browse files

80 char width

parent 9e55eff6
# Introduction
The R package `bookdownplus` [@Reference] , [@HamF85], [@StaWW91] is an extension of `bookdown`. It is a collection of
multiple templates on the basis of LaTeX, which are tailored so that I can work happily under the umbrella of `bookdown`. `bookdownplus` helps you write academic journal articles, guitar books, chemical equations, mails, calendars, and diaries.
The R package `bookdownplus` [@Reference] , [@HamF85], [@StaWW91] is an
extension of `bookdown`. It is a collection of multiple templates on the basis
of LaTeX, which are tailored so that I can work happily under the umbrella of
`bookdown`. `bookdownplus` helps you write academic journal articles, guitar
books, chemical equations, mails, calendars, and diaries.
# Features
`bookdownplus` extends the features of `bookdown`, and simplifies the procedure. Users only have to choose a template, clarify the book title and author name, and then focus on writing the text. No need to struggle in YAML and LaTeX.
`bookdownplus` extends the features of `bookdown`, and simplifies the
procedure. Users only have to choose a template, clarify the book title and
author name, and then focus on writing the text. No need to struggle in YAML
and LaTeX.
With `bookdownplus` users can
- record guitar chords,
......@@ -25,18 +29,28 @@ With `bookdownplus` users can
- and more wonders will come soon.
Full documentation can be found in the book [R bookdownplus Textbook](https://bookdown.org/baydap/bookdownplus). The webpage looks so-so, while the [pdf file](https://bookdown.org/baydap/bookdownplus/bookdownplus.pdf) might give you a little surprise.
Full documentation can be found in the book
[R bookdownplus Textbook](https://bookdown.org/baydap/bookdownplus). The webpage
looks so-so, while the
[pdf file](https://bookdown.org/baydap/bookdownplus/bookdownplus.pdf) might give
you a little surprise.
# Quick start
Although this section might not be the latest version, the general idea won't change. Please see [R bookdownplus Textbook](https://bookdown.org/baydap/bookdownplus) to keep up with the update.
Although this section might not be the latest version, the general idea won't
change. Please see
[R bookdownplus Textbook](https://bookdown.org/baydap/bookdownplus) to keep up
with the update.
## Preparation
Before starting, you have to install R, RStudio, bookdown package, and
other software and packages (i.e. Pandoc, LaTeX, rmarkdown, rticle,
knitr, etc.) which bookdown depends on. See the official [manual](https://bookdown.org/yihui/bookdown/) of
bookdown for details. Additionally, if you want to produce a poster, phython must be installed before using, and the path of phython might have to be added to the environmental variables for Windows users.
knitr, etc.) which bookdown depends on. See the official
[manual](https://bookdown.org/yihui/bookdown/) of bookdown for details.
Additionally, if you want to produce a poster, phython must be installed before
using, and the path of phython might have to be added to the environmental
variables for Windows users.
## Installation
......@@ -49,7 +63,8 @@ devtools::
## Generate demo files
Run the following codes, and you will get some files (e.g. `index.Rmd`, `body.Rmd`, `bookdownplus.Rproj`) and folders in your working directory.
Run the following codes, and you will get some files (e.g. `index.Rmd`,
`body.Rmd`, `bookdownplus.Rproj`) and folders in your working directory.
```
getwd() # this is your working directory. run setwd() to change it.
......@@ -58,15 +73,18 @@ bookdownplus::bookdownplus()
## Build a demo book
Now open `bookdownplus.Rproj` with RStudio, and press `ctrl+shift+b` to compile it. Your will get a book file named `*.pdf` in `_book/`folder.
Now open `bookdownplus.Rproj` with RStudio, and press `ctrl+shift+b` to compile
it. Your will get a book file named `*.pdf` in `_book/`folder.
## Write your own
Write your own text in `index.Rmd` and `body.Rmd`, and build your own lovely book.
Write your own text in `index.Rmd` and `body.Rmd`, and build your own lovely
book.
## More outputs
By default, the book is in a pdf file. From 'bookdownplus' 1.0.3, users can get more output formats, including 'word', 'html' and 'epub'. Run:
By default, the book is in a pdf file. From 'bookdownplus' 1.0.3, users can get
more output formats, including 'word', 'html' and 'epub'. Run:
```
bookdownplus::
......@@ -76,11 +94,14 @@ bookdownplus::
## Recommendations
I have been developing some other packages, which bring more features into 'bookdown', such as:
I have been developing some other packages, which bring more features into
'bookdown', such as:
- mindr [@R-mindr], which can extract the outline of your book and turn it into a mind map, and
- mindr [@R-mindr], which can extract the outline of your book and turn it into
a mind map, and
- pinyin [@R-pinyin], which can automatically generate ['{#ID}'](https://bookdown.org/yihui/bookdown/cross-references.html) of the chapter headers even if there are Chinese characters in them.
- pinyin [@R-pinyin], which can automatically generate ['{#ID}'](https://bookdown.org/yihui/bookdown/cross-references.html) of the
chapter headers even if there are Chinese characters in them.
Both of them have been released on CRAN and can be installed via:
......@@ -105,13 +126,15 @@ It can be written as $E = mc^2$.
# Results
Fig. \@ref(fig:fig1) psum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Fig. \@ref(fig:fig1) psum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
```{r fig1, fig.cap='caption', out.width='80%', fig.align='center', echo=FALSE}
plot(cars)
```
Tab. \@ref(tab:tab1) psum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Tab. \@ref(tab:tab1) psum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.
```{r tab1, tidy=FALSE, echo=FALSE, message = FALSE}
library(tidyverse)
......@@ -125,6 +148,10 @@ kable(
# Conclusions
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
in culpa qui officia deserunt mollit anim id est laborum
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment