Using acthesis requires installing LaTeX on your computer and installing the acthesis package in R.
To knit the document to PDF, you need to have LaTeX installed. We outline two options below for installing LaTeX on your machine: using the tinytex package in R (small, quick download but requires individual installation of LaTeX packages), or installing the full LaTeX download for Windows or Mac (large download: about 5 GB).
By far the easiest way to install LaTeX on any platform is with the tinytex package in R.
Run the following in your R console:
install.packages('tinytex')
tinytex::install_tinytex()
# after restarting RStudio, confirm that you have LaTeX with
tinytex:::is_tinytex()
While required LaTeX packages should download automatically, you may need to install LaTeX packages or style files manually. You can do this using the tlmgr_install function, for example:
# install the booktabs latex package
tinytex::tlmgr_install('booktabs')
If you have the internet connectivity, hard drive space, and know-how for managing a full LaTeX install, you can download LaTeX using one of the following:
- For any operating system: TeX Live
- For Mac: MacTeX
- For Windows: MiKTeX
- For full download, go to the 'All downloads' tab and download the Net Installer
- If you download the basic install instead, you may need to download individual LaTeX packages as needed (as described above)
-
Ensure that you have already installed LaTeX and are using the latest version of R and RStudio.
-
Install the remotes, bookdown, and acthesis packages (if you are on the server, do NOT update any of the packages if it prompts you to. Instead, hit 'Enter' or choose the
3: Noneoption to avoid the package updates):
if(!require("remotes")) install.packages("remotes", repos = "http://cran.rstudio.org")
if(!require("bookdown")) install.packages("bookdown", repos = "http://cran.rstudio.org")
remotes::install_github("Amherst-Statistics/acthesis")
-
Create a new R Markdown from Template and select Amherst Thesis (you may need to restart RStudio to get it to show up). For now, name the primary .Rmd file
indexas shown below (you can change this later). This will create a new folder called index in whichever location you choose (you can rename the index folder after it is created--it has no effect on the ability to knit the thesis template). The thesis template files will be inside that folder (see figures below). -
As a test run, knit the
index.Rmdfile to PDF to make sure everything works! Contact Prof. Bailey if you are having trouble. The knitted pdf and corresponding tex file will be located in the newly created index folder:index/_book/firstName-lastName_StatThesis.pdf. There will also be a_bookdown_filesdirectory that contains any cached items and generated figures. You can delete both the_bookand_bookdown_filesdirectories after this test run. -
Read through the User Guide to see how to set up the thesis template for your use and how to work with it day-to-day
This project was inspired by the bookdown package and is an updated version of Chester Ismay's Senior Thesis template in the reedtemplates package.
Currently, the PDF and gitbook versions are fully-functional.
If you are new to working with bookdown/rmarkdown, you can read over the documentation available in the gitbook template or at Chester Ismay's site.
See the PDF Thesis Example and read the acthesis user guide for guidance.
Under the hood, the Amherst College LaTeX template is used to ensure that documents conform precisely to submission standards. At the same time, composition and formatting can be done using lightweight markdown syntax, and R code and its output can be seamlessly included using rmarkdown.

