https://github.com/tysonstanley/dissertateusu
Materials for writing a dissertation at Utah State University in R Markdown
https://github.com/tysonstanley/dissertateusu
Last synced: 7 months ago
JSON representation
Materials for writing a dissertation at Utah State University in R Markdown
- Host: GitHub
- URL: https://github.com/tysonstanley/dissertateusu
- Owner: TysonStanley
- Created: 2017-11-07T23:17:04.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-02-25T03:22:12.000Z (over 3 years ago)
- Last Synced: 2025-01-24T18:12:01.187Z (9 months ago)
- Language: TeX
- Size: 4.85 MB
- Stars: 12
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
devtools::load_all()
```# `dissertateUSU` `v0.3.1`
[](https://github.com/TysonStanley/dissertateUSU/actions)
[](https://doi.org/10.5281/zenodo.3516441)
The goal of `dissertateUSU` is to make two aspects of writing a dissertation at Utah State University better:
1. Formatting of the dissertation is automatically done for you
2. All analyses are intimately tied to the document, making the work more reproducibleUltimately, this allows the student to focus on the writing and the results without having to worry excessively about updating tables and figures, adjusting formatting of things like the title page and table of contents, and other minor (but important) aspects of getting the document correct.
It is up-to-date as of the 2020-21 graduate school formatting guidelines.
## Installation
You can install `dissertateUSU` with:
``` r
remotes::install_github("tysonstanley/dissertateUSU")
```## LaTeX
> Importantly, this package requires the new release of LaTeX from your preferred distribution. Older versions will often encounter an error regarding "\\counterwithin". If this error comes up for you, then you need to update your LaTeX.
## Example
To use the package, after installing it--*and restarting Rstudio*--open up a new RMarkdown file:
and select the "Dissertate USU" template:
This will open up a new folder with a skeleton RMarkdown file:
This produces a document that matches the USU dissertation guidelines:
If you'd rather have the Master's Thesis cover page, just remove the `committee5` and `committee4` lines in the main `.Rmd` file.
### General Notes
- To put the title on two lines (see the thesis cover page above), use `\newline` (or if that doesn't work, use `\\newline`) at the point where you want the title to split to the second line. In general, USU wants the first of the two title lines to be longer than the second part.
- If you don't need a section (e.g., "Public Abstract", "Chapter 5", etc.), remove it from the main `.Rmd` file. For example, if you want to remove the "Public Abstract", remove all the lines starting from the `\newpage` in that section down to the actual words `Publically abstracted words go here.`. It will then not be included in the knitted document.
- Currently, the package uses APA 7 formatting for citations (by default) but this can be altered by downloading a new `.csl` file and specifying it in the yaml, by replacing the `apa7.csl` in the `pandoc_args: [ "--csl", "apa7.csl" ]` argument with your file name. The package also comes with `apa6.csl` to use.
- Although the School of Graduate Studies at Utah State University has approved the use of `dissertateUSU`, before using it, talk to your committee chair and your graduate program coordinator to make sure it is approved by your department.## Writing, Writing, Writing
In the folder, there are other RMarkdown files called `Chapter1.Rmd`, `Chapter2.Rmd`, etc. These are the files where you will do the writing and analyzing. The main RMarkdown file will bring all these files together into one document. The only things you need to update in the main RMarkdown file is the `yaml` information, the abstracts, acknowledgments, and dedication.
## Some specifics for formatting
### Appendices
To add appendices, you can use the following at the very end of the skeleton `.Rmd` file:
```
\clearpage
\addcontentsline{toc}{chapter}{APPENDICES}
\fancyhead[L]{Appendices}
\fancyhead[R]{Page\newline\thepage}
\fancyfoot[C]{}\vspace*{\fill}
\begin{center}
APPENDICES
\end{center}
\vspace*{\fill}\addcontentsline{toc}{section}{Appendix A}
\section*{Appendix A}
...appendix stuff...
```### Multipaper Format
A now common approach for dissertations at Utah State University are multi-paper dissertations. To make this work in `dissertateUSU`, you will need to use four steps. First, note each of the chapters that are the individual papers (e.g., chapters 2, 3, and 4).
First, add the bibliography line to the yaml for each chapter that will be its own paper. To do that, add the following lines to the top of the `.Rmd` file, where `yourbibfile.bib` is the name of the bib file you are using. At the same time, remove the `\newpage` to `\chapter{}` from the core `.Rmd` file for that specific chapter. Do this for each chapter.
```
---
bibliography: yourbibfile.bib
---\newpage
\fancyhead[R]{\thepage}
\fancyfoot[C]{}\chapter{Chapter name}
```Second, add the following at the end of the chapter.
```
\section*{References}\setlength{\parindent}{-0.6in}
\setlength{\leftskip}{0.6in}
\setlength{\parskip}{6pt}
\noindent
```Third, to reset the paragraph formatting for the following chapter, at the beginning of the next chapter add:
```
\setlength{\parindent}{0.4in}
\setlength{\leftskip}{0.0in}
\setlength{\parskip}{6pt}
\noindent
```Finally, change the core `.Rmd` code chunks from:
````markdown
`r ''````{r, child="Chapter2.Rmd"}
```
````to:
````markdown
`r ''````{r, results='asis'}
chapter_knit("Chapter2")
```
````This will do an alternative form of knitting (and will create a `.md` and `.tex` file for the chapter).
## Final Notes and Thanks
The package is still undergoing some development and we would love feedback on any aspect that doesn't work as expected.
We also want to thank the [`rticles`](https://github.com/rstudio/rticles) package for the functionality for `dissertateUSU`. The idea to make this package, as well as its design, was derived from the `rticles` package.
And thanks to David Jenks for his help finding LaTeX bugs from older LaTeX releases.