-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
executable file
·199 lines (165 loc) · 7.91 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
#####################
## output format ##
#####################
# The lines below makes the 'knit' button build the entire thesis
# Edit the line 'thesis_formats <- "pdf"' to the formats you want
# The format options are: 'pdf', 'bs4', 'gitbook', 'word'
# E.g. you can build both pdf and html with 'thesis_formats <- c("pdf", "bs4")'
# knit: (function(input, ...) {
# thesis_formats <- "pdf";
#
# source("scripts_and_filters/knit-functions.R");
# knit_thesis(input, thesis_formats, ...)
# })
#####################
## thesis metadata ##
#####################
title: |
`oxforddown`: \
An Oxford University Thesis \
Template for R Markdown
author: Author Name
college: Your College
university: University of Oxford
university-logo: templates/beltcrest.pdf
university-logo-width: 5cm
submitted-text: A thesis submitted for the degree of
degree: Doctor of Philosophy
degreedate: Michaelmas 2018
dedication: For Yihui Xie
acknowledgements: |
`r paste(readLines("front-and-back-matter/_acknowledgements.Rmd"), collapse = '\n ')`
show-acknowledgements-in-toc: false
abstract-heading: "Abstract"
abstract: |
`r paste(readLines("front-and-back-matter/_abstract.Rmd"), collapse = "\n ")`
show-abstract-in-toc: false
# add a second abstract with abstract-second-heading: "Abstract two", and abstract-second: "My abstract"
abbreviations: |
`r paste(readLines("front-and-back-matter/_abbreviations.Rmd"), collapse = '\n ')`
#######################
## bibliography path ##
#######################
bibliography: [bibliography/references.bib, bibliography/additional-references.bib]
########################
## PDF layout options ###
#########################
### submitting a master's thesis ###
# set masters-submission: true for an alternative, anonymous title page with
# candidate number and word count
masters-submission: false
candidate-number: 123456
word-count: "10,052"
# if you want to use a different title page altogether, provide a path to a
# .tex file here and it will override the default Oxford one
# alternative-title-page: templates/alt-title-page-example.tex
### abbreviations ###
abbreviations-width: 3.2cm
abbreviations-heading: List of Abbreviations
### citation and bibliography style ###
# heading title for the references section
params:
insertReferencesHeadingInPDF: true
insertReferencesHeadingInOtherOutput: true
referenceHeading: "References"
# citation and reference options (pandoc) #
csl: bibliography/apa.csl # try csl: bibliography/transactions-on-computer-human-interaction.csl for numerical citations
refs-line-spacing: 6mm
refs-space-between-entries: 1mm
## biblatex options ##
#use-biblatex: true # set to true, and set "output:bookdown::pdf_book: citation_package: biblatex"
#bib-latex-options: "style=authoryear, sorting=nyt, backend=biber, maxcitenames=2, useprefix, doi=true, isbn=false, uniquename=false" #for science, you might want style=numeric-comp, sorting=none for numerical in-text citation with references in order of appearance
## natbib options ##
#use-natbib: true # set to true, and set "output:bookdown::pdf_book: citation_package: natbib"
#natbib-citation-style: authoryear #for science, you might want numbers,square
#natbib-bibliography-style: templates/ACM-Reference-Format.bst #e.g. "plainnat", unsrtnat, or path to a .bst file
### correction highlighting ###
corrections: true
### link highlighting ###
colored-not-bordered-links: true # true = highlight links by coloring text; false = highlight links with a border
# Set the link text/border coloring here, in RGB.
# Comment out a variable to use whatever the text's existing color is.
# If printing a physical version of your thesis, you'll want to comment out all of these.
urlcolor-rgb: "0,0,139" # web addresses
citecolor-rgb: "0,33,71" # citations
linkcolor-rgb: "0,0,139" # links to sections in your thesis
# Make page number, not text, be link in TOC, LOF, and LOT. Otherwise, section link
# highlighting may look a bit excessive.
toc-link-page-numbers: true
### binding / margins ###
page-layout: nobind #'nobind' for equal margins (PDF output), 'twoside' for two-sided binding (mirror margins and blank pages), leave blank for one-sided binding (left margin > right margin)
### position of page numbers ###
#C = center, R = right, L = left. If page layout is 'twoside', O = odd pages and E = even pages. E.g. RO,LE puts the page number to the right on odd pages and left on even pages
ordinary-page-number-foot-or-head: foot #'foot' puts page number in footer, 'head' in header
ordinary-page-number-position: C
chapter-page-number-foot-or-head: foot #you may want it to be different on the chapter pages
chapter-page-number-position: C
### position of running header ###
#C = center, R = right, L = left. If page layout is 'twoside', O = odd pages and E = even pages. E.g. RO,LE puts the page number to the right on odd pages and left on even pages
running-header: true #indicate current chapter/section in header?
running-header-foot-or-head: head
running-header-position-leftmark: LO #marks the chapter. If layout is 'nobind', only this is used.
running-header-position-rightmark: RE #marks the section.
### draft mark ###
draft-mark: false # add a DRAFT mark?
draft-mark-foot-or-head: foot ##'foot' = in footer, 'head' = in header
draft-mark-position: C
### section numbering ###
section-numbering-depth: 2 # to which depth should headings be numbered?
### tables of content ###
toc-depth: 1 # to which depth should headings be included in table of contents?
lof: true # include list of figures in front matter?
lot: true # include list of tables in front matter?
mini-toc: true # include mini-table of contents at start of each chapter? (this just prepares it; you must also add \minitoc after the chapter titles)
mini-lot: false # include mini-list of tables by start of each chapter?
mini-lof: false # include mini-list of figures by start of each chapter?
### code block spacing ###
space-before-code-block: 10pt
space-after-code-block: 8pt
### linespacing ###
linespacing: 22pt plus2pt # 22pt is official for submission & library copies
frontmatter-linespacing: 17pt plus1pt minus1pt #spacing in roman-numbered pages (acknowledgments, table of contents, etc.)
### title page
title-size: 22pt
title-size-linespacing: 28pt
gap-before-crest: 25mm
gap-after-crest: 25mm
### other stuff ###
abstractseparate: false # include front page w/ abstract for examination schools?
includeline-num: false # show line numbering in PDF?
line-wrapping-in-code: true #wrap overflowing lines in code blocks?
### symbol footnotes (see https://stackoverflow.com/a/69489747)
header-includes:
- \renewcommand*{\thefootnote}{\fnsymbol{footnote}}
#####################
## output details ##
#####################
site: bookdown::bookdown_site
link-citations: true
documentclass: book
always_allow_html: true #this allows html stuff in word (.docx) output
---
```{r setup, include=FALSE}
# flextable formatting options (see also https://davidgohel.github.io/flextable/reference/flextable_to_rmd.html)
if (knitr::is_latex_output()) {
knitr::opts_chunk$set(ft.tabcolsep = 0, ft.latex.float = "none")
}
# make flextable tables use default latex font for pdf output (otherwise defaults to Helvetica font)
flextable::set_flextable_defaults(fonts_ignore = TRUE)
```
```{r install_packages, include=FALSE}
source('scripts_and_filters/install_packages_if_missing.R')
```
```{r create_chunk_options, include=FALSE, eval=knitr::is_latex_output()}
source('scripts_and_filters/create_chunk_options.R')
source('scripts_and_filters/wrap_lines.R')
```
<!--
Include the create_chunk_options chunk above at the top of your index.Rmd file
This will include code to create additional chunk options (e.g. for adding author references to savequotes)
If you need to create your own additional chunk options, edit the file scripts/create_chunk_options.R
-->
<!-- This chunk includes the front page content in HTML output -->
```{r ebook-welcome, child = 'front-and-back-matter/_welcome-ebook.Rmd', eval=knitr::is_html_output()}
```