amsterdown is an RMarkdown PhD thesis template for the University of Amsterdam. It’s based on my PhD thesis that I wrote with the bookdown package.

(R)Markdown enables you to write a reproducible PhD thesis using the lightweight and plain-text Markdown formatting. It forms a great notebook style workflow to integrate all your text, code, figures, and other output that together make up your PhD thesis work. Finally, bookdown allows you to easily create an html-version of your thesis that you can host online, and to harness the power of LaTeX to make a beautifully formatted PDF for printing your thesis.

This template is an easy way to get started, by:

  • Providing a common and complete structure for the thesis, including appendices, acknowledgments, etc.
  • Removing the need to write any LaTeX commands yourself (or at least, prolonging it as long as possible).
  • Making sure you adhere to the University of Amsterdam thesis requirements.

Installation

amsterdown is not (yet) available on CRAN, so install it from GitHub with:

if(!require(devtools)) install.packages("devtools") # devtools package allows installation of packages from github
devtools::install_github("lcreteig/amsterdown") # install amsterdown from github

If you just want a peek at the template without installing it as an R package, check out the folder with all the files here on Github.

Alternatively, to try out using the template without having to install anything locally, click this button to launch an RStudio session with everything you need pre-installed: Launch Rstudio Binder Then simply follow the Usage instructions below.

Usage

If you’ve installed the package and are using RStudio, simply navigate to “File” > “New File” > “R Markdown…” > “From Template” > “UvA thesis {amsterdown}”. Use index for the new directory name (feel free to change this after), so that the main file will be called index.Rmd, then hit OK.

Then, create a new RStudio project by going to “File” > “New Project…” > “Existing Directory”, then “Browse…” to the directory you just created (index, or whatever you named it to), and finally hit “Create Project”.

Click “Build Book” from the Build pane to render the thesis to an output format of your choosing.

Or, (e.g., if you’re not using the RStudio IDE), run the following lines of R code to render the template:

rmarkdown::draft('index.Rmd', # create new draft based off template
                 template = 'thesis', package = 'amsterdown', 
                 create_dir = TRUE, edit = FALSE) 
setwd("index") # navigate to new directory
# render the thesis template to all output formats
bookdown::render_book("index.Rmd", output_format = "all") 
# or
#bookdown::render_book("index.Rmd", output_format = 'bookdown::gitbook') # to render to html
#bookdown::render_book("index.Rmd", output_format = 'bookdown::pdf_book') # to render to PDF

See the package documentation for more detailed instructions and further information.

Example output

The template supports html and pdf outputs. To inspect the outputs as produced by the latest version of the template, see here: html, pdf (A4), pdf (book)

Requirements

If you’re using RStudio, all you should have to do is install the amsterdown package (the bookdown package will be installed along with it). You’ll also need a LaTeX distribution to be able to create the pdf outputs. If you don’t have one yet, I’d recommend TinyTeX.

If you don’t have RStudio installed, you’ll also need to install pandoc if you don’t have it already (in addition to a LaTex distribution).

Attribution

This project was inspired by other RMarkdown PhD thesis templates that use bookdown, notably:

  • Chester Ismay’s thesisdown for Reed College
  • Ben Marwick’s huskydown for the University of Washington
  • Ulrik Lyng’s oxforddown for Oxford University

PhD theses that have used this template

User 🤓 University 🏫 Link 🔗
noorseijdel University of Amsterdam noorseijdel.github.io/thesis
LDSamson University of Groningen ldsamson.github.io/Thesis/
lukassnoek University of Amsterdam lukassnoek/thesis
BenGoudsmit University of Leiden BenGoudsmit/Thesis
Leo4Luffy Universitat Autònoma de Barcelona Leo4Luffy/Repo_TFM
lynnsoerensen University of Amsterdam UvA-DARE