bookdownplus: Create demo files for building books with R bookdown package.

Description Usage Arguments Value Examples

View source: R/fun.R

Description

Technically, bookdownplus is a collection and selector of R bookdown templates. bookdownplus helps you write academic journal articles, guitar books, chemical equations, mails, calendars, and diaries. R 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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
bookdownplus(
  template = "copernicus",
  more_output = NULL,
  title = "title",
  author = "author",
  render = TRUE,
  rproj = TRUE,
  output_name = NA,
  to = "./",
  new = TRUE
)

Arguments

template

character. Choose a template for your book or doc. The default template is 'thesis_classic'. Run template() to see the available templates.

more_output

optional output formats besides pdf_book, which can be (run get_output() for hints):

  • NULL (default)

  • 'word_document2'

  • 'html_document2'

  • 'epub_book'

  • 'gitbook'

title

character. book title.

author

character. book author.

render

logical. whether to render automatically

rproj

logical. whether to created an .Rproj file automatically

output_name

chracter. the name of the output files. If NA (default), the template name will be used.

to

character. The destination directory for the bookdown project

new

logical. Whether create a new project. If FALSE, only render the existing book.

Value

demo files to build with bookdown

Examples

1
2
3
4
5
6
7
## Not run: 
bookdownplus(render = FALSE)
for (i in get_template()[1:20, 1]) {
    # bookdownplus(template = i, more_output = more_output()[1:3], to = i)
}

## End(Not run)

Example output

The github repo "pzhaonet/bookdownplus" cannot be connected. Thus only local templates are displayed.
Warning message:
In file(file, "rt") :
  URL 'https://raw.githubusercontent.com/pzhaonet/bookdownplus/master/upload/-list.csv': status was 'Couldn't resolve host name'
The github repo "pzhaonet/bookdownplus" cannot be connected. Thus only local templates are displayed.
Warning message:
In file(file, "rt") :
  URL 'https://raw.githubusercontent.com/pzhaonet/bookdownplus/master/upload/-list.csv': status was 'Couldn't resolve host name'

bookdownplus documentation built on March 26, 2020, 7:11 p.m.