This package provides templates to publish well-formatted documents both in HTML and PDF formats. Documents can be produced locally or hosted on GitHub, where GitHub actions can update the published documents continuously.
Long documents are the main purpose of this package. Along with a GitBook or Bootstrap 4 version to be read online, their PDF version based on the LaTeX class memoir can be highly customized (see examples 1 and 2).
Functions are provided to make the publication of the documents on GitHub very easy, including their continuous integration.
Templates include:
Available HTML formats for articles are:
bookdown::gitbook
bookdown::html_document2
)rmdformats::downcute
is by default. See the package documentation for other possibilities.base_format: distill::distill_article
option in bookdown::html_document2
).In RStudio, either:
create a new R Markdown document and chose the appropriate template in the wizard:
or directly create a project with the appropriate wizard:
Articles and slideshows are produced by clicking on the Knit button of the Source pane of their Rmd file. Memoirs are produced by clicking on the Build Book button of the Build pane.
Push your project to GitHub and activate GitHub Pages to make your documents readable online. The following functions help simplify that task:
build_gitignore()
to create a .gitignore
file. Activate git source control then.build_readme()
to create a README.md
file, that will be the GitHub Pages index of articles or slideshows.build_githubpages()
to move knitted documents (articles or slideshows) to the docs
folder.Documents can be knitted by GitHub Action if continuous integration is activated:
build_ghworkflow()
to create the necessary script (.github/workflows/check.yml
).The feather in the memoiR package sticker is from Wikimedia under license CC BY-SA 3.0.
The memoir LaTeX package is on CTAN.
The Stylish Article template is adapted from LaTeX Templates, that in turn adapted it from a LaTeX class by Mathias Legrand. Its licence is CC BY-NC-SA 3.0.
https://EricMarcon.github.io/memoiR/
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.