Package 'pdfreport'

Title: A template for pdf report written in Rmarkdown
Description: Create a tex file that defines caracteristics of your PDF report template.
Authors: Sebastien Rochette [aut, cre]
Maintainer: Sebastien Rochette <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-09-12 02:42:22 UTC
Source: https://github.com/statnmap/pdfreport

Help Index


Create pdf header.tex file

Description

Create pdf header.tex file

Usage

create_pdf_header(
  author = "Author",
  title = "Title",
  description = "Description",
  email = "[email protected]",
  slogan = "R report",
  created_on = "Created on",
  bg = "Background_dark_topdown_ThinkR.png",
  bg.title = "Background_Title_dark_ThinkR.png",
  link.col = "blue",
  section.color = "forestgreen",
  main.col = "#192ac7",
  out.header = file.path(tempdir(), "header.tex"),
  company = "Company",
  company_url = "https://company.fr"
)

Arguments

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 PNG image used a main background

bg.title

path to PNG image used a Report Title background

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

out.header

Path where to save header.tex

company

company name

company_url

company_url


Create content of latex header.tex file

Description

Create content of latex header.tex file

Usage

pdf_header(
  author,
  title,
  email,
  description,
  slogan = "R report",
  created_on = "Created on",
  bg = "Background_dark_topdown_ThinkR.png",
  bg.title = "Background_Title_dark_ThinkR.png",
  link.col = "#FF8000",
  section.color = "#2447c4",
  main.col = "#192ac7",
  company,
  company_url
)

Arguments

author

Name of the author of the report

title

Title of the report

email

Email for contact

description

Short description of the report

slogan

Sentence that

created_on

Allow translation for "Created on"

bg

path to PNG image used a main background

bg.title

path to PNG image used a Report Title background

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


Create header and footer of the pages

Description

Create header and footer of the pages

Usage

pdf_headerfooter(
  author,
  email,
  slogan = "R report",
  created_on = "Created on",
  company = "ThinkR",
  company_url = "https://thinkr.fr"
)

Arguments

author

Name of the author of the report

email

Email for contact

slogan

Sentence that

created_on

Allow translation for "Created on"

company

company name

company_url

company_url


Pdf Layout

Description

Pdf Layout

Usage

pdf_layout(
  bg = "Background_dark_topdown_ThinkR.png",
  bg.title = "Background_Title_dark_ThinkR.png",
  link.col = "#FF8000",
  main.col = "#192ac7"
)

Arguments

bg

path to PNG image used a main background

bg.title

path to PNG image used a Report Title background

link.col

Color in the R language (name or hex)

main.col

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


Format titles

Description

Format titles

Usage

pdf_sections(section.color = "#2447c4")

Arguments

section.color

Color of section titles


Title page of the report

Description

Title page of the report

Usage

pdf_title(author, title, description, company, company_url)

Arguments

author

Name of the author of the report

title

Title of the report

description

Short description of the report

company

company name

company_url

company_url


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

Description

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

Usage

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 = "[email protected]",
  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

## 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)

Prepare yaml for knitting

Description

Prepare yaml for knitting

Usage

prepare_yaml_for_knit(
  rmd.path,
  fig_caption = TRUE,
  keep_tex = FALSE,
  number_sections = TRUE,
  toc = TRUE,
  lang = "en",
  out_format = c("pdf_document2", "pdf_book")
)

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"

Details

Document dimensions and margins are fixed as linked with background image