Skip to content

R Markdown framework for producing theses and dissertations that meet the formatting requirements of Stellenbosch University. Derived from Danie Els's Latex package "usthesis" which is available on CTAN.

Notifications You must be signed in to change notification settings

Hendrivanz/su_thesis_template

Repository files navigation


This R Markdown template is designed to typeset theses and dissertations that conform to the requirements of Stellenbosch University. The template is based on the file class, usthesis, created by Danie Els. The relevant CTAN package can be found here. An example of a thesis created using an older version of this template can be found here.

Before You Start

  • On GitHub, click the “Use this template” button to import the source files on your own machine.

  • Make sure that you have the TinyTeX package installed and loaded in R. Here is a useful guide to TinyTex.

  • Feel free to contact me should you come across any issues.

Repository Structure

The contents of this repo are as follows:

Important files in su_thesis_template
images\su_logo.jpgindex.pdf
abstract.Rmdindex.Rmd
acknowledgements.Rmdmybib.bib
appendix.Rmdsu_thesis_template.Rproj
body.Rmdustemplate.tex

index.Rmd and index.pdf

  • index.Rmd is arguably the most important file in the repository and should serve as the starting- and end-point of the user’s workflow.

  • Its purpose is to define the skeleton (or structure) and of the final document. The structure is partly determined by the main template file ustemplate.tex, which index.Rmd calls upon, and by the composition of “child” files (e.g., body.Rmd and appendix.Rmd) it specifies. Moreover, it enables the user to specify whether and from where to include abstracts, acknowledgements, lists of tables/figures/abbreviations, a nomenclature, and the source of the bibliography.

  • index.Rmd is also where the document’s metadata is defined; that is, details regarding the author, title, date, etc.. These specifications are made in the YAML at the top of the index.Rmd file. This information will automatically be reflected in the final document.

  • It is very useful to centralise the loading of packages and specification of default code chunk settings from this file. This can be done from the setup code chunk in index.Rmd, as illustrated below.

  • The final document is knitted from index.Rmd, and hence, will produce the final document titled index.pdf.

ustemplate.tex

  • This $\TeX$ file contains the main substance of the template. It reflects the primary set of rules according to which the final document will be formatted. Apart from the recommended modifications below, I do not recommend that the user affect many major changes to this file.
Line(s)DescriptionOption
12Dictates whether the template should conform to the requirements of a Master's thesis or PhD dissertation.`masters-t` or `PhD`.
296-306Defines the addresses of the institution in Afrikaans and English, which are displayed in the abstracts.Change the text of the addresses to reflect that of your department.
321Adds/removes co-supervisor to the cover page.Uncomment or comment line with "%" to add and remove co-supervisor.
325Defines a sponsorship disclaimer which appears on the cover page.Uncomment or comment line with "%" to add and remove the sponsorhip disclaimer. Change the contents of the parentheses as needed.
336Adds the watermark of the SU logo on the cover page.Change the file path of the image you would like to use {./images/su_logo.jpg}, and raise and lower the logo {-2cm}. With longer titles, it may be required to further lower the logo, e.g., {-3.5cm}.

mybib.bib

  • mybib.bib serves as only bibliography file for this template. It must have the standard bibtex syntax and the extension .bib. It contains a list of bibliography sources and several fields with information about each entry.

  • Add bibtex sources manually or have your reference management applications, such as Zotero, export and automatically update sources to the mybib.bib file.

  • As indicated in the YAML of index.Rmd, this template uses the natbib package to perform reference management and the customisation of your bibliography. It is not recommended that users alter these settings, as the template already adopts settings appropriate for Stellenbosch University requirements.

images\su_logo.jpg

  • Image used for the logo on the cover page.

  • The folder images can also be used as the user’s directory for other images utilised in the document.

abstract.Rmd

  • This file contains the objects for English and Afrikaans abstracts. These will appear in the final document after the plagiarism declaration.

  • Because these objects are given in a $\LaTeX$ environment, standard markdown syntax should be replaced with $\LaTeX$ syntax.

  • To create citations, for example, in abstract.Rmd, the user must use \cite{marais2021} (or similar) instead of [@marais2021].

  • To remove the Afrikaans abstract (or “Uittreksel”), delete everything between and including \begin{abstract}[afrikaans] and \end{abstract}.

acknowledgements.Rmd

  • This file contains the content of the author’s acknowledgements. It appears in the final document after the abstracts and before the table of contents.

  • As with abstract.Rmd, the acknowledgements object is given in a $\LaTeX$ environment. Therefore, the user must opt for the appropriate syntax. For example, lists are made using the \begin{itemize} and \item commands as opposed the syntax demanded by markdown.

body.Rmd and appendix.Rmd

  • body.Rmd is intended to contain the main corpus of the thesis or dissertation; that is, from the introduction to the conclusion. It will appear after the List of Tables and before any appendices.

  • appendix.Rmd is intended to contain the content which will appear after the conclusion of the main body of text and before the list of references.

  • The user is able to use the full suite of Markdown and $\LaTeX$ syntax throughout these files.

su_thesis_template.Rproj

  • As always, users are encouraged to work on their thesis/dissertation R files from the project file ending with .Rproj. In other words, when restarting RStudio, users are should open the application from this file. This is more important than usual, because file paths important for the functioning of the template are fixed in relation to the directory where the .Rproj file is located.

About

R Markdown framework for producing theses and dissertations that meet the formatting requirements of Stellenbosch University. Derived from Danie Els's Latex package "usthesis" which is available on CTAN.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages