Commit 09c6d1a8 authored by lorenzwalthert's avatar lorenzwalthert
Browse files

minor tweaks

parent 35d9abc6
...@@ -33,12 +33,14 @@ The basic workflow is as follows: ...@@ -33,12 +33,14 @@ The basic workflow is as follows:
is under `./rmd/`. For example, change `02-features.Rmd` is under `./rmd/`. For example, change `02-features.Rmd`
* Re-compile the book using Cmd + Shift + B (for build) on a Mac and Ctrl + * Re-compile the book using Cmd + Shift + B (for build) on a Mac and Ctrl +
Shift + B on Windows / Linux. Shift + B on Windows / Linux.
* You can customize the build in the RStudio Build Tab, where you can specify
which output (html, pdf, etc.) you want to generate. This is remembered for
the next build you are doing.s
**Why using bookdown** **Why using bookdown**
The advantages of using bookdown instead of plain LaTeX are, in the eyes of the The advantages of using bookdown instead of plain LaTeX are, in the eyes of the
creator of this template. creator of this template:
* Generalization. Not just latex or PDF output, but any output supported by * Generalization. Not just latex or PDF output, but any output supported by
Pandoc. Pandoc.
...@@ -48,12 +50,15 @@ creator of this template. ...@@ -48,12 +50,15 @@ creator of this template.
figure reference. figure reference.
* It's native R. Integrate R code and R output in your writing has never been * It's native R. Integrate R code and R output in your writing has never been
easier than with bookdown. You can also use other languages supported by easier than with bookdown. You can also use other languages supported by
knitr such as python, stan etc. knitr such as python, stan etc.^[Below, we even used the bash command `tree`
to show the directory structure of this repo. Since unicode is not suppored
with pdflatex, we used R code to tell knitr to use the tree command
with the option `charset unicode` for pdf output and without it for html
output.]
**How this template works** **How this template works**
There are different directories in this template. We canuse the bash command There are different directories in this template:
tee to show the output
```{bash, include = knitr::is_html_output()} ```{bash, include = knitr::is_html_output()}
tree -d -L 2 tree -d -L 2
...@@ -88,7 +93,7 @@ project: ...@@ -88,7 +93,7 @@ project:
the `Imports:` field. If someone want's to rebuild you thesis from scratch, the `Imports:` field. If someone want's to rebuild you thesis from scratch,
the can use `remotes::install_deps()` to satisfy all R package dependencies. the can use `remotes::install_deps()` to satisfy all R package dependencies.
* index.R: Contains a YAML header where a few important variables are defined. * index.R: Contains a YAML header where a few important variables are defined.
You can also put markdown below the HEADER. You can also put markdown below the header.
* README.(R)md This document. * README.(R)md This document.
* thesis-template-bookdown.Rproj: An RStudio project. We recommend using * thesis-template-bookdown.Rproj: An RStudio project. We recommend using
RStudio for authoring your master thesis with bookdown. RStudio for authoring your master thesis with bookdown.
......
...@@ -21,11 +21,14 @@ The basic workflow is as follows: ...@@ -21,11 +21,14 @@ The basic workflow is as follows:
thesis is under `./rmd/`. For example, change `02-features.Rmd` thesis is under `./rmd/`. For example, change `02-features.Rmd`
- Re-compile the book using Cmd + Shift + B (for build) on a Mac and - Re-compile the book using Cmd + Shift + B (for build) on a Mac and
Ctrl + Shift + B on Windows / Linux. Ctrl + Shift + B on Windows / Linux.
- You can customize the build in the RStudio Build Tab, where you can
specify which output (html, pdf, etc.) you want to generate. This is
remembered for the next build you are doing.s
**Why using bookdown** **Why using bookdown**
The advantages of using bookdown instead of plain LaTeX are, in the eyes The advantages of using bookdown instead of plain LaTeX are, in the eyes
of the creator of this template. of the creator of this template:
- Generalization. Not just latex or PDF output, but any output - Generalization. Not just latex or PDF output, but any output
supported by Pandoc. supported by Pandoc.
...@@ -35,12 +38,11 @@ of the creator of this template. ...@@ -35,12 +38,11 @@ of the creator of this template.
reference, LaTeX cross-, text- and figure reference. reference, LaTeX cross-, text- and figure reference.
- It’s native R. Integrate R code and R output in your writing has - It’s native R. Integrate R code and R output in your writing has
never been easier than with bookdown. You can also use other never been easier than with bookdown. You can also use other
languages supported by knitr such as python, stan etc. languages supported by knitr such as python, stan etc.\[1\]
**How this template works** **How this template works**
There are different directories in this template. We canuse the bash There are different directories in this template:
command tee to show the output
``` bash ``` bash
tree -d -L 2 --charset unicode tree -d -L 2 --charset unicode
...@@ -93,7 +95,7 @@ the project: ...@@ -93,7 +95,7 @@ the project:
thesis from scratch, the can use `remotes::install_deps()` to thesis from scratch, the can use `remotes::install_deps()` to
satisfy all R package dependencies. satisfy all R package dependencies.
- index.R: Contains a YAML header where a few important variables are - index.R: Contains a YAML header where a few important variables are
defined. You can also put markdown below the HEADER. defined. You can also put markdown below the header.
- README.(R)md This document. - README.(R)md This document.
- thesis-template-bookdown.Rproj: An RStudio project. We recommend - thesis-template-bookdown.Rproj: An RStudio project. We recommend
using RStudio for authoring your master thesis with bookdown. using RStudio for authoring your master thesis with bookdown.
...@@ -117,3 +119,8 @@ experience writing their master thesis. ...@@ -117,3 +119,8 @@ experience writing their master thesis.
Best, Best,
Nicola Gnecco and Lorenz Walthert Nicola Gnecco and Lorenz Walthert
1. Below, we even used the bash command `tree` to show the directory
structure of this repo. Since unicode is not suppored with pdflatex,
we used R code to tell knitr to use the tree command with the option
`charset unicode` for pdf output and without it for html output.
...@@ -40,3 +40,4 @@ site: bookdown::bookdown_site ...@@ -40,3 +40,4 @@ site: bookdown::bookdown_site
# forget first-level headings in certain Rmd files? # forget first-level headings in certain Rmd files?
#) #)
--- ---
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment