Knit: Knit

KnitR Documentation

Knit

Description

Create documents from templates

Usage

knit_all(destination = usethis::proj_path("docs"), gallery = "gallery")

knit_template(
  template,
  output_format,
  destination = usethis::proj_path("docs"),
  gallery = "gallery"
)

Arguments

destination

name of the folder containing GitHub pages or equivalent.

gallery

name of the subfolder of destination to store the knitted documents.

template

name of the template to knit, e.g. "simple_article".

output_format

A character vector of the output formats to convert to. Each value must be the name of a function producing an output format object, such as "bookdown::pdf_book".

Details

These functions are used to test the templates and produce a gallery.

  • knit_template() produces an HTML and a PDF output of the chosen template.

  • knit_all() runs knit_template() on all templates of the package. The output_format argument selects the way templates are rendered:

  • articles may be rendered in HTML by bookdown::html_document2, bookdown::gitbook, rmdformats::downcute (and others, see the package rmdformats) and in PDF by bookdown::pdf_book.

  • books may be rendered in HTML by bookdown::gitbook or bookdown::bs4_book and in PDF by bookdown::pdf_book.

  • slides may be rendered in HTML by bookdown::slidy_presentation2, bookdown::ioslides_presentation2 and in PDF by bookdown::beamer_presentation2.

These functions are mainly used for test and documentation purposes. In projects based on the templates, use the Knit button (articles, presentations) or the Build the Book button (memoirs) or bookdown::render_book().

Value

TRUE if all documents have been knitted and copied to the gallery, invisibly.


memoiR documentation built on May 29, 2024, 5:29 a.m.