UHHformats
R Package for R Markdown and Quarto Templates with UHH corporate design
Install / Use
/learn @uham-bio/UHHformatsREADME
UHHformats <img src="vignettes/images/UHHformats_logo.png" align="right" width="90" height="100" />
This R package provides ready-to-use R Markdown and Quarto templates for HTML, PDF, and Microsoft Word output formats. The templates are designed for the Department of Biology, University of Hamburg (UHH), and its Data Science in Biology program, but can be used by anyone — logos and styles are easily customizable via the YAML header.
All templates ship with example text and code for formatting, equations, tables, figures with cross-references, and citations.
For thesis templates see the companion package UHHthesis or the separate Quarto extension.
Available templates
| Template | R Markdown function | Quarto template |
|:--------------------|:--------------------|:-----------------|
| HTML document | html_doc() | html_doc |
| Simple PDF document | pdf_doc() | pdf_doc |
| PDF report | pdf_report() | pdf_report |
| PDF cheat sheet | pdf_cheatsheet() | pdf_cheatsheet |
| Word document | word_doc() | word_doc |
The default font is Helvetica. PDF and Word templates also support the University’s own font TheSans UHH (available to UHH members).
Backward compatibility: The old function names
html_simple()andpdf_simple()still work as aliases.
See the template gallery for screenshots and demo files.
Installation
Install from GitHub:
# Using the package 'pak' (recommended)
if (!require("pak")) install.packages("pak")
pak::pak("uham-bio/UHHformats")
# Alternatively, using 'remotes'
if (!require("remotes")) install.packages("remotes")
remotes::install_github("uham-bio/UHHformats", build_vignettes = TRUE)
Required dependencies (rmarkdown, knitr, bookdown) are installed automatically.
Prerequisites
Quarto CLI
For Quarto templates, install the Quarto
CLI. To render .qmd files from
R, also install the quarto R package:
install.packages("quarto")
Pandoc
R Markdown and Quarto use Pandoc to convert documents. RStudio ships with its own Pandoc installation. If you render from the console without RStudio, you need Pandoc installed on your system:
- Installation: https://pandoc.org/installing.html
- Minimum required version: 2.17
LaTeX (for PDF output)
For PDF output you also need a LaTeX distribution. An easy cross-platform option is the tinytex R package:
install.packages("tinytex")
tinytex::install_tinytex()
For other distributions see https://www.latex-project.org/get/.
Credits
- Julien Barnier’s rmdformats package
- The rticles package
- INWTlab’s ireports package
- Sarah Lang’s LaTeX cheat sheet template
- Eli Holmes’ quarto titlepages collection
