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: | 2025-02-09 02:58:52 UTC |
Source: | https://github.com/statnmap/pdfreport |
Create pdf header.tex file
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" )
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" )
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
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 )
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 )
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 |
Pdf Layout
pdf_layout( bg = "Background_dark_topdown_ThinkR.png", bg.title = "Background_Title_dark_ThinkR.png", link.col = "#FF8000", main.col = "#192ac7" )
pdf_layout( bg = "Background_dark_topdown_ThinkR.png", bg.title = "Background_Title_dark_ThinkR.png", link.col = "#FF8000", main.col = "#192ac7" )
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
pdf_sections(section.color = "#2447c4")
pdf_sections(section.color = "#2447c4")
section.color |
Color of section titles |
Title page of the report
pdf_title(author, title, description, company, company_url)
pdf_title(author, title, description, company, company_url)
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
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 )
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 )
rmd.path |
Path of the Rmd file to be knit |
fig_caption |
|
keep_tex |
Keep the intermediate tex file used in the conversion to PDF |
number_sections |
|
toc |
|
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 |
## 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)
## 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
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") )
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") )
rmd.path |
Path of the Rmd file to be knit |
fig_caption |
|
keep_tex |
Keep the intermediate tex file used in the conversion to PDF |
number_sections |
|
toc |
|
lang |
Document language code (e.g. "en", "es", "fr", "pt-BR") |
out_format |
output pdf format among "pdf_book", "pdf_document2" |
Document dimensions and margins are fixed as linked with background image