All Projects → benmarwick → huskydown

benmarwick / huskydown

Licence: Unknown, MIT licenses found Licenses found Unknown LICENSE MIT LICENSE.md
An R Markdown template using the bookdown package for preparing a PhD thesis at the University of Washington

Projects that are alternatives of or similar to huskydown

Concordia Latex Template
Concordia University LaTeX Template for Master's thesis or PHD thesis.
Stars: ✭ 6 (-94.83%)
Mutual labels:  latex-template, thesis-template
Scientific Thesis Template
LaTeX template for Master, Bachelor, Diploma, and Student Theses
Stars: ✭ 228 (+96.55%)
Mutual labels:  latex-template, thesis-template
Aaulatextemplates
A collection of Aalborg University LaTeX-templates
Stars: ✭ 85 (-26.72%)
Mutual labels:  latex-template, thesis-template
Dissertate
Beautiful LaTeX dissertation templates.
Stars: ✭ 521 (+349.14%)
Mutual labels:  latex-template, thesis-template
R-Markdown-Template
R Markdown Templates For Chinese Users
Stars: ✭ 21 (-81.9%)
Mutual labels:  rmarkdown, rmarkdown-templates
Zjuthesis
Zhejiang University Graduation Thesis LaTeX Template
Stars: ✭ 720 (+520.69%)
Mutual labels:  latex-template, thesis-template
Hagenbergthesis
Hagenberg LaTeX Thesis Template
Stars: ✭ 130 (+12.07%)
Mutual labels:  latex-template, thesis-template
thesis template
A comprehensive LaTeX template with examples for theses, books and more, employing the 'latest and greatest' (UTF8, glossaries, fonts, ...). The PDF artifact is built using CI/CD.
Stars: ✭ 121 (+4.31%)
Mutual labels:  latex-template, latex-thesis-template
rmdTemplates
Rmarkdown templates for reproducible science
Stars: ✭ 112 (-3.45%)
Mutual labels:  rmarkdown, rmarkdown-templates
linguisticsdown
Easy Linguistics Document Writing with R Markdown
Stars: ✭ 24 (-79.31%)
Mutual labels:  rmarkdown, rmarkdown-template
Tum Thesis Latex
📔 A LaTeX template for TUM Bachelor/Master theses.
Stars: ✭ 291 (+150.86%)
Mutual labels:  latex-template, thesis-template
ntuthesis
台大碩博士論文模板 (R Package)
Stars: ✭ 14 (-87.93%)
Mutual labels:  rmarkdown, thesis-template
CASIA-Thesis
自动化所硕博论文模板
Stars: ✭ 28 (-75.86%)
Mutual labels:  latex-template, thesis-template
Ustcthesis
LaTeX template for USTC thesis
Stars: ✭ 724 (+524.14%)
Mutual labels:  latex-template, thesis-template
Yet-Another-LaTeX-Template-for-NPU-Thesis
西北工业大学硕博学位论文模版 | Yet Another Thesis Template for Northwestern Polytechnical University
Stars: ✭ 82 (-29.31%)
Mutual labels:  latex-template, thesis-template
Latex Template For Npu Thesis
LaTeX Template For NPU Thesis
Stars: ✭ 127 (+9.48%)
Mutual labels:  latex-template, thesis-template
elteikthesis
ELTE IK szakdolgozat és diplomamunka sablon.
Stars: ✭ 32 (-72.41%)
Mutual labels:  latex-template, thesis-template
HNUThesisTemplate
湖南大学本科生毕业论文LaTeX模板
Stars: ✭ 31 (-73.28%)
Mutual labels:  latex-template, thesis-template
yart
RMarkdown Template for writing PDF reports
Stars: ✭ 81 (-30.17%)
Mutual labels:  rmarkdown, rmarkdown-template
rmarkdown-templates
A collection of personal templates for RMarkdown
Stars: ✭ 29 (-75%)
Mutual labels:  rmarkdown, rmarkdown-templates

huskydown

Travis-CI Build Status

This project provides a template for writing a PhD thesis in R Markdown, and rendering those files into a PDF formatted according to the requirements of the University of Washington. It uses the University of Washington Thesis class to convert R Markdown files into a PDF formatted ready for submission at UW. This project was inspired by the thesisdown and bookdown packages.

Currently, the PDF and gitbook versions are fully-functional, and are the focus of this package. The word and epub versions are in development, have no templates behind them, and are essentially calls to the appropriate functions in bookdown.

If you are new to working with bookdown and rmarkdown, please read over the documentation available in huskydown PDF template (which you can create by following the simple instructions below) and the bookdown book.

Under the hood, the University of Washington Thesis 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.

Using huskydown to write your PhD thesis

Initial setup

Using huskydown has some prerequisites, such as Pandoc, LaTeX and some fonts. To compile PDF documents using R, you need to have Pandoc, LaTeX and several related packages installed. If you have a recent version of RStudio, then you already have Pandoc and don't need to do anything more about that.

Next is LaTeX. By far the easiest way to install LaTeX on any platform is with the tinytex package:

install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex()
# after restarting RStudio, confirm that you have LaTeX with 
tinytex:::is_tinytex()

Our PDF template requires some specific fonts, EB Garamond, Source Code Pro and Lato. These are included in this repository. You need to install these before proceeding, either by using your usual method of installing fonts, or following these instructions:

On a Linux system here's the simplest way to install the fonts:

git clone https://github.com/benmarwick/huskydown
cd huskydown && unzip inst/fonts.zip
cp inst/fonts -r ~/usr/local/share/fonts
sudo fc-cache -f -v

On an OSX system you can download a copy of the fonts in this repository with https://github.com/benmarwick/huskydown/raw/master/inst/fonts.zip, unzip and move them to your fonts directory, or, assuming homebrew is installed and updated, this will get you the fonts needed for this template:

brew update
brew tap caskroom/fonts
brew cask install font-eb-garamond font-source-code-pro font-lato

On Windows the usual pointing and clicking is required to install the fonts listed above. You can download a copy of the fonts in this repository at https://github.com/benmarwick/huskydown/raw/master/inst/fonts.zip, unzip and move them to your fonts directory.

Starting to write your thesis

To use huskydown from RStudio:

  1. Ensure that you have already installed LaTeX and the fonts described above, and are using the latest version of RStudio. You can use huskydown without RStudio. For example, you can write the Rmd files in your favourite text editor (e.g. Atom, Notepad++). But RStudio is probably the easiest tool for writing both R code and text in your thesis.

  2. Install the bookdown and huskydown packages:

if (!require("devtools")) install.packages("devtools", repos = "http://cran.rstudio.org")
devtools::install_github("rstudio/bookdown")
devtools::install_github("benmarwick/huskydown")
  1. Use the New R Markdown dialog to select Thesis, here are the steps, and a screenshot below:

File -> New File -> R Markdown... then choose 'From template', then choose 'UW-Thesis, and enter index as the Name. Note that this will currently only Knit if you name the directory index at this step.

Or if you're not using RStudio, run this line in your R console to create a new PhD thesis from the template:

rmarkdown::draft('index.Rmd', template = 'thesis', package = 'huskydown', create_dir = TRUE)

Day-to-day writing of your thesis

You need to edit the individual chapter R Markdown files to write your thesis.

You can write in the Rmd files without RStudio (in fact RStudio lacks some conveniences for writing, such as live spell-checking and live word count). So you may prefer to do some writing and editing your Rmd files in your favourite text editor. I frequently use Atom, Notepad++, and Emacs. But I come back to RStudio to create the PDF and work on the R code in my documents.

While writing, you should git commit your work frequently, after every major activity on your thesis. For example, every few paragraphs or section of text, and after major step of analysis development. You should git push at the end of each work session before you leave your computer or change task. For gentle novice-friendly guide to getting starting with using Git with R and RStudio, see http://happygitwithr.com/.

Rendering

To render your thesis into a PDF, open index.Rmd in RStudio and then click the "knit" button. To change the output formats between PDF, gitbook and Word , look at the output: field in index.Rmdand comment-out the formats you don't want.

Alternatively, if you're not using RStudio, you can use this from the R console, assuming your have set the 'index/ directory as your working directory:

bookdown::render_book('index.Rmd', huskydown::thesis_pdf(latex_engine = 'xelatex'))

The PDF file of your thesis will be deposited in the _book/ directory.

Components

The following components are ones you should edit to customize your thesis:

_bookdown.yml

This is the main configuration file for your thesis. It determines what Rmd files are included in the output, and in what order. Arrange the order of your chapters in this file and ensure that the names match the names in your folders.

index.Rmd

This file contains all the meta information that goes at the beginning of your document. You'll need to edit this to put your name on the first page, the title of your thesis, etc.

01-chap1.Rmd, 02-chap2.Rmd, etc.

These are the Rmd files for each chapter in your dissertation. Write your thesis in these. If you're writing in RStudio, you may find the wordcount addin useful for getting word counts and readability statistics in R markdown documents. You might also enjoy writing in these Rmd files with Atom, Notepad++, Sublime Text, and Emacs.

bib/

Store your bibliography (as bibtex files) here. We recommend using the citr addin and Zotero to efficiently manage and insert citations.

csl/

Specific style files for bibliographies should be stored here. A good source for citation styles is https://github.com/citation-style-language/styles#readme

figure/ and data/

Store your figures and data here and reference them in your R Markdown files. See the bookdown book for details on cross-referencing items using R Markdown.

Related projects

This project has drawn directly on code and ideas in the following:

Other relevant projects:

Contributing

If you would like to contribute to this project, please start by reading our Guide to Contributing. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].