stormdown
to write your Ph.D. dissertationThis walkthrough guides you through the process of how to use stormdown
to write your Ph.D. dissertation.
It should cover everything you should need to get started from a brand-new PC.
If it does not, add an issue to the backlog or submit a PR.
If you have been using your PC for a while, the chances are that most of the work is already done.
Feel free to skip steps you do not need (like installing R).
This guidance is Windows-centric, but similar steps should run on Mac or Linux.
The version numbers for the packages I use are noted.
If you use a different version, YMMV.
When testing these steps, I started from a new VM in Azure. If you find something that does not work, you may need to fiddle with your install base. Assuming there is enough interest, I will put up a troubleshooting FAQ.
if('Unrestricted' -ne (Get-ExecutionPolicy)) { Set-ExecutionPolicy Bypass -Scope Process -Force }
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
refreshenv
choco install r.project --version=3.6.3 -y
refreshenv
choco install r.studio --version=1.2.5033 -y
choco install rtools --version=3.5.0.4 -y
rmarkdown
(2.3), bookdown
(0.20), tinytex
(0.24), devtools
(2.3.0), kableExtra
(1.1.0), dplyr
(1.0.0), and ggpubr
(0.3.0).kableExtra
, rlang
, dplyr
, and ggpubr
are only used in the sample sections.
You only need them to test the inital Knit.r <- getOption('repos')
r['CRAN'] <- 'https://mran.microsoft.com/snapshot/2020-06-24'
options(repos = r)
install.packages(c('rmarkdown', 'bookdown', 'tinytex'))
install.packages(c('devtools'))
install.packages(c('kableExtra', 'dplyr', 'ggpubr'))
tinytex::install_tinytex()
tinytex:::is_tinytex()
stormdown
then restart R Studio
rtools
won't work if there is no timezone set, so that may need done too.if(Sys.timezone() == 'unknown') { Sys.setenv(TZ = 'GMT') }
devtools::install_github('markanewman/stormdown', upgrade = 'never')
index
as the Name (see Figures 1-2 below).
Note that this will currently only Knit if you name the directory index
at this step.
Please note: both the folder and the entry point rmd
file are called index.
The file name must remain index.rmd
, but you may want to rename your directory to something more memorable. {r}
#only if not running RStudio
rmarkdown::draft('index', template = 'dissertation', package = 'stormdown', create_dir = T, edit = F)
{r}
#only if not running RStudio
setwd("index")
{r}
#only if not running RStudio
bookdown::render_book('index.rmd')
Figure 1: Path to new templates
Figure 2: Create new template
Figure 3: Set working directory
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.