Awesome
<!-- README.md is generated from README.Rmd via `devtools::build_readme()`. Please edit README.Rmd -->gaelsdown <img src="gaelsdown.png" align="right" width=200 />
The gaelsdown project is a branch of Chester Ismay’s thesisdown package, providing a template for writing theses in rmarkdown that can be rendered as PDF according to the Queen’s University style and form requirements.
This README provides instructions for 1) Installing the gaelsdown templates in RStudio and 2) Knitting a starter document from files installed with the template. You can preview the document in different formats here:
Note: Word and ePub formats are developmental only and have no underlying template
This starter document provides a tutorial for how to use gaelsdown when writing and formatting your thesis. gaelsdown and thesisdown are both based on bookdown, and if you are new to using bookdown, you should definitely take a read through my tutorial before diving in!
The PDF generated by this template uses LaTeX templates provided by the Queen’s Graduate Computing Society, but if you are interested in using a different template to create your thesis, then take a look at the end of this README. I’ve also provided summary of changes from thesisdown in News.md.
Installing gaelsdown from Eugene’s GitHub
The following instructions are adapted from
thesisdown, with contributions
from Ben Marwick developed for the
README of his spin-off huskydown
package.
Using gaelsdown has some prerequisites which are described below. To compile PDF documents using R, you are going to need to have LaTeX installed. By far the easiest way to install LaTeX on any platform is with the tinytex R package:
install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex()
# after restarting RStudio, confirm that you have LaTeX with
tinytex:::is_tinytex()
To use gaelsdown from RStudio:
-
Ensure that you have already installed LaTeX (see above) and are using the latest version of RStudio.
-
Install the
bookdown
andgaelsdown
packages. Note thatgaelsdown
is not available on CRAN at the moment and that’s whyinstall.packages("gaelsdown")
won’t work. Usedevtools::install_github("eugenesit/gaelsdown")
as shown below instead to install the package.if (!require("devtools")) install.packages("devtools", repos = "https://cran.rstudio.org") devtools::install_github("rstudio/bookdown") devtools::install_github("eugenesit/gaelsdown")
Note that you may need to restart RStudio at this point for the following dialog to show up.
-
Create a new RStudio project with a gaelsdown template.
In RStudio, click on File > New Project > New Directory. Then select Queen’s Thesis Project using gaelsdown from the dropdown that will look something like the image below. You’ll see the Q as the icon on the left for the appropriate project type.
Next, give your project a name and specify where you’d like the files to appear. In the screenshot below, the project name is
my_thesis
and it will appear as a new folder on my Desktop.Note: You can also set up the folder in RStudio from “New File -> R Markdown -> From Template” and selecting “Queen’s University Thesis”, although this is no longer recommended.
Knitting a starter document
You will now have a project directory containing the files necessary to
knit the starter document locally. To generate a PDF from your new
directory, open index.Rmd
(if it isn’t open already), then click on
Knit.
At this point, you will see three different steps proceeding in your
RStudio console pane under the R Markdown
tab:
-
index.Rmd
will be processed byknitr
into amarkdown
file that is temporarily stored in the project directory. -
A call to pandoc (which is bundled with your RStudio install) converts the markdown file to a TeX file.
-
Once the TeX file has been created, LaTeX will convert this into a PDF. During the first render, LaTeX may have to install a number of packages on your system, and will do so automatically at this stage. Note that these installations may lengthen the rendering process.
If everything proceeds successfully, a PDF viewer will open displaying
the starter document. You can also find this file in the project
directory under /_book/thesis.pdf
. Congratulations, you’ve
successfully installed gaelsdown on your system! To start working on
fitting your thesis in this template, I recommend reading through the
tutorial I’ve written in thesis.pdf
(which you can also find online
here).
Customizing a template for your institution
In an ideal world, Chester’s thesisdown would support a variety of different LaTeX templates from a wide range of institutions and we’d love to get it there at some point. Until that time, folks have been busy adapting the package to work with their institutions! Here are some that have customized it to fit their needs. You may find one that fits your needs, and if not, it is recommended you review how they changed the files by comparing their repositories to this one and then make tweaks to yours as needed. Feel free to file an issue on this repo if you have questions/troubles.
Have you created a thesisdown template for your institution and would
like to have it included here? Make a PR similar to the commit done to
include
jayhawkdown
for Chester to review. Let’s keep the list going!