Bookdown contest submission: A R package for a PDF template for Reports with special Title page and customisable header/footer

I created a R package to help build a pdf report template: GitHub - statnmap/pdfreport: Create a template for a report in PDF using Rmarkdown

This creates a specific template for the cover page and a common template with header and footer for other pages.

With a unique R function, it is possible to define all the different parameters of the template like title, name, header and footer information, custom colors for title, section and url. Specified colors are also usable in the text using specific lateX shortcodes.

The package includes two background images that are used as the basis of the two templates. The svg images are included so that the user can modify background images with Inkscape for instance.

The R function modifies your YAML to be in accordance with the template and to allow to include the created template lateX files before knitting. The function allows to directly knit or not.
The template is working with bookdown::pdf_document2 and bookdown::pdf_book, which allows references to figures, etc...
The user can choose the language of the document for date format and other specific lateX formatting. Sentence "Created on" is a modifiable parameter so that it can be used in any language.

This package is available on my github account: https://github.com/statnmap/pdfreport

The complete template is coded in lateX inside different R functions.

5 Likes

That is an interesting application! It certainly makes it easier for people who don't know LaTeX to customize their PDF reports. Thanks for sharing!

Yes, this is the aim.
I also have the HTML equivalent with code folding for gitbook and html_document2, but it is not totally finished. I'll share it for the next contest !