Building University Thesis Templates with R Markdown


Universities typically require graduate students to follow rigorous formatting standards when they submit their dissertations. To ease this process, administrative services offer LaTeX or Word templates that preload these requirements. Neither format, however, integrates data analysis into the writing process. A solution to this problem is presented by R, the Markdown language, LaTeX, and Pandoc. R supplies the coding environment, Markdown enables the combination of code and text in the same document, LaTeX provides the layout and typesetting potential, and Pandoc converts the eventual document into a number of output formats, including .pdf. The result is a dynamic document written entirely within the R environment that that complies with universities’ rigorous formatting standards.

Several R Markdown packages provide adapted templates, but none provide instructions how to achieve said adaption. For this reason, I compiled a guide how to gradually adapt an existing university dissertation R Markdown LaTeX template currently available on GitHub. Any student can follow these instructions to create an R Markdown dissertation template for their universityies’ specific requirements. This guide is intended for students who are familiar with R Markdown and LaTeX but do not have experience in adapting LaTeX code to make it work in R Markdown.