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.
-
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 inR
. Here is a useful guide toTinyTex
. -
Feel free to contact me should you come across any issues.
The contents of this repo are as follows:
Important files in su_thesis_template | |
---|---|
images\su_logo.jpg | index.pdf |
abstract.Rmd | index.Rmd |
acknowledgements.Rmd | mybib.bib |
appendix.Rmd | su_thesis_template.Rproj |
body.Rmd | ustemplate.tex |
-
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
, whichindex.Rmd
calls upon, and by the composition of “child” files (e.g.,body.Rmd
andappendix.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 theYAML
at the top of theindex.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 inindex.Rmd
, as illustrated below.
- The final document is knitted from
index.Rmd
, and hence, will produce the final document titledindex.pdf
.
- 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) | Description | Option |
---|---|---|
12 | Dictates whether the template should conform to the requirements of a Master's thesis or PhD dissertation. | `masters-t` or `PhD`. |
296-306 | Defines 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. |
321 | Adds/removes co-supervisor to the cover page. | Uncomment or comment line with "%" to add and remove co-supervisor. |
325 | Defines 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. |
336 | Adds 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
serves as only bibliography file for this template. It must have the standardbibtex
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 themybib.bib
file. -
As indicated in the
YAML
ofindex.Rmd
, this template uses thenatbib
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.
-
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.
-
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}
.
-
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
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.
- As always, users are encouraged to work on their thesis/dissertation
R
files from the project file ending with.Rproj
. In other words, when restartingRStudio
, 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.