prepare_for_knit: Prepare files for knit Prepare everything before knit. You...

Description Usage Arguments Examples

View source: R/create_pdf_header.R

Description

Prepare files for knit Prepare everything before knit. You can then knit the bookdown::pdf_book yourself

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
prepare_for_knit(
  rmd.path,
  fig_caption = TRUE,
  keep_tex = FALSE,
  number_sections = TRUE,
  toc = TRUE,
  lang = "en",
  out_format = c("pdf_document2", "pdf_book"),
  author = "Sebastien, @StatnMap",
  title = "Title of the report",
  description = "A template for PDF reports",
  email = "sebastien@thinkr.fr",
  slogan = "R report",
  created_on = "Created on",
  bg,
  bg.title,
  link.col = "#f67412",
  section.color = "#0099ff",
  main.col = "#192ac7",
  company = "ThinkR",
  company_url = "https://rtask.thinkr.fr",
  knit = FALSE,
  output_dir
)

Arguments

rmd.path

Path of the Rmd file to be knit

fig_caption

TRUE to render figures with captions

keep_tex

Keep the intermediate tex file used in the conversion to PDF

number_sections

TRUE to number section headings

toc

TRUE to include a table of contents in the output

lang

Document language code (e.g. "en", "es", "fr", "pt-BR")

out_format

output pdf format among "pdf_book", "pdf_document2"

author

Name of the author of the report

title

Title of the report

description

Short description of the report

email

Email for contact

slogan

Sentence that

created_on

Allow translation for "Created on"

bg

path to background image

bg.title

path to title background image

link.col

Color in the R language (name or hex)

section.color

Color of section titles

main.col

Color of the title on the title page and Company name in header

company

company name

company_url

company_url

knit

Logical. Whether to knit document after it has been made ready

output_dir

directory where to save pdf output. Default to Rmd directory

Examples

1
2
3
4
5
6
## Not run: 
prepare_for_knit(rmd.path = system.file("example/template_example.Rmd", package = "pdfreport"))
prepare_for_knit(rmd.path = system.file("example/template_example.Rmd", package = "pdfreport"),
knit = TRUE, output_dir = tempdir())

## End(Not run)

statnmap/pdfreport documentation built on Feb. 28, 2021, 6:43 a.m.