-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.rmd
167 lines (129 loc) · 3.56 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
---
title: "TITLE" #change title here
subtitle: "SUBTITLE" #change subtitle here
author: "Nachname, Vorname"
mail: "[email protected]"
date: "XX/XX/202X" #change date here
location: "Kassel"
subject: "ABC - X. Fachsemester"
subject2: "XYZ - X. Fachsemester"
matriculation_number: "12345678"
university: "Universität Kassel"
lecturer: "Frau / Herr / Dr. / Prof. "
faculty: "Fachbereich 05 Geselschaftswissenschaften"
module : "NAME MODUL"
class: "NAME KURS"
keywords: "Keyword1, Keyword2"
output:
pdf_document:
toc_depth: 3
number_sections: true
pandoc_args:
- --listings
#- --lua-filter=scripts/first-line-indent.lua
- --lua-filter=scripts/wordcount.lua
- --metadata=wordcount=process
latex_engine: xelatex #xelatex #lualatex #pdflatex
includes:
in_header: styles/preamble.tex #include styling
keep_tex: false
bookdown::pdf_book:
citation_package: biblatex #natbib #biblatex
bibliography: ["`r paste(list.files(path = 'bib', pattern = '^.+\\.bib$', full.names = TRUE), collapse='\",\"')`"]
csl: styles/apa7.csl #include citation styleing
lang: de #change language here
fontsize: 12pt #change font size here #max=12
urlcolor: "magenta"
---
<!-- this chunk is your setup-chunk -->
```{r setup, include=FALSE}
knitr::opts_chunk$set(
echo = FALSE,
message = FALSE,
warning = FALSE
)
library(tidyverse)
here::i_am("index.rmd")
# get information from YAML header
yaml <- rmarkdown::yaml_front_matter("index.Rmd")
knitr::knit_hooks$set(
inline = function(x) {
if (!is.numeric(x)) {
x
} else{
prettyNum(round(x, 2), big.mark = " ")
}
}
)
options("scipen" = 100, "digits" = 4)
options(qwraps2_markup = "latex") #markdown
theme_set(theme_classic())
```
<!-- automatically create a bib database for R packages -->
```{r include=FALSE}
knitr::write_bib(c(.packages(), 'knitr', 'rmarkdown'),
'bib/packages.bib')
```
<!-- load data -->
```{r}
data(starwars) #example dataframe
```
<!-- include title -->
\pagestyle{fancy}
\fancyhf{}
\renewcommand{\headrulewidth}{0.0pt}
\pagenumbering{gobble}
<!-- begin title -->
\thispagestyle{empty}
```{r, child=c('children/000title.rmd')}
```
\pagebreak
<!-- end title -->
<!-- set header options -->
\fancyfoot{}
\fancyhead[R]{\thepage}
<!-- include abstract -->
\setstretch{1.5} <!-- line spaceing 1.5-->
```{r, child=c('children/002abstract.Rmd')}
```
\pagebreak
<!-- include list of abbreviations lof, lot, toc -->
\setstretch{1}
\pagenumbering{roman} <!-- set page numbering to roman numbers -->
\listoffigures
\pagebreak
\listoftables
\pagebreak
\printacronyms[name=Abkürzungsverzeichnis]
\addcontentsline{toc}{section}{Abkürzungsverzeichnis}
\pagebreak
\setcounter{tocdepth}{`r paste0(yaml$output$pdf_document$toc_depth)`}
\tableofcontents
\pagebreak
<!-- begin body -->
\pagenumbering{arabic}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\leftmark}
\fancyhead[R]{\thepage}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0pt}
\setstretch{1.5} <!-- set line spaceing -->
<!-- include chapter / children -->
```{r, child=c('children/010introduction.rmd', 'children/020literature_review.rmd', 'children/030hypotheses.rmd', 'children/040operationalization.rmd', 'children/050analysis.rmd', 'children/060conclusion.rmd')}
```
<!-- end body -->
<!-- inlude bibliography -->
\pagebreak
\fancyhead{}
\fancyhead[R]{\thepage}
# Literaturverzeichnis {-}
<div id="refs"></div>
<!-- include apendix -->
\pagebreak
\pagenumbering{gobble}
# Anhang {-}
\thispagestyle{empty}
\pagenumbering{gobble}
```{r, child=c('children/999apendix.Rmd')}
```