-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rmd
executable file
·194 lines (163 loc) · 7.51 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
---
#####################
## 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
abstract: |
`r paste(readLines("front-and-back-matter/_abstract.Rmd"), collapse = '\n ')`
acknowledgements: |
`r paste(readLines("front-and-back-matter/_acknowledgements.Rmd"), collapse = '\n ')`
dedication: For Maya and Benjamin
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: 3cm
abbreviations-heading: List of Abbreviations
### citation and bibliography style ###
bibliography-heading-in-pdf: References
# biblatex options #
# unless you run into 'biber' error messages, use biblatex as it lets you customise your bibliography directly
use-biblatex: true
bib-latex-options: "citestyle=authoryear, sorting=nyt, backend=biber, maxcitenames=2, useprefix, url=true, doi=false, isbn=false, uniquename=false, bibstyle=apa" #for science, you might want style=numeric-comp, sorting=none for numerical in-text citation with references in order of appearance
# natbib options #
# natbib runs into fewer errors than biblatex, but to customise your bibliography you need to fiddle with .bst files
use-natbib: false # to use natbib, set this to true, and change "output:bookdown::pdf_book:citation_package:" to "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: false
### 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: "60,179,113" # web addresses
citecolor-rgb: "60,179,113" # citations
linkcolor-rgb: "60,179,113" # 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: twoside #'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 ###
ordinary-page-number-foot-or-head: foot #'foot' puts page number in footer, 'head' in header
ordinary-page-number-position: C #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
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 ###
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: L
### section numbering ###
section-numbering-depth: 3 # to which depth should headings be numbered?
### tables of content ###
toc-depth: 3 # 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?
#####################
## output details ##
#####################
output:
bookdown::pdf_book:
citation_package: biblatex
template: templates/template.tex
keep_tex: true
pandoc_args: "--lua-filter=scripts_and_filters/colour_and_highlight.lua"
bookdown::bs4_book:
css:
- templates/bs4_style.css
- templates/corrections.css # remove to stop highlighting corrections
theme:
primary: "#6D1919"
repo: https://github.com/ulyngs/oxforddown
pandoc_args: "--lua-filter=scripts_and_filters/colour_and_highlight.lua"
bookdown::gitbook:
css: templates/style.css
config:
sharing:
facebook: false
twitter: yes
all: false
bookdown::word_document2:
toc: true
link-citations: true
documentclass: book
always_allow_html: true #this allows html stuff in word (.docx) output
---
```{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()}
```