Skip to contents

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() and pdf_simple() still work as aliases.

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:

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/.


Learn more


Useful resources


Author

Saskia A. Otto University of Hamburg · Department of Biology · Institute of Marine Ecosystem and Fisheries Science · GitHub · Website