-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tex
229 lines (185 loc) · 6.02 KB
/
main.tex
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
% !TeX root = ./main.tex
\documentclass[
a4paper,
doc,
% CHANGE TEXT SIZE HERE
11pt,
]{apa6}
% to have contents as inhaltsverzeichnis and so on if localized - german example
% -> i18n babel itself get's loaded by one of the packages below
\PassOptionsToPackage{german,english}{babel}
\usepackage{csquotes}
\usepackage{fontspec}
\usepackage{polyglossia}
% DELETE IF NON GERMAN - FIXES ß character display
\setmainlanguage[babelshorthands=true]{german}
% Color page for links
\usepackage{xcolor}
% Can define other colors here
% Is good starting point
\definecolor{inner-link-blue}{rgb}{0,0,0.37}
\definecolor{cite-grey}{rgb}{0.26,0.26,0.26}
\usepackage[
colorlinks=true, % turns of ugly boxes and sets color of links on
linktoc=all, %table of contents links colored
% and configure here
linkcolor=inner-link-blue, % internal links color
citecolor=cite-grey, % citations link color
urlcolor={blue!80!black} % urls outside document
]{hyperref}
% to cite sources
% Other options for style,sorting available
\usepackage[sorting=none,style=apa]{biblatex}
% sources
\addbibresource{./sources.bib}
% subfiles import as last
\usepackage{subfiles}
% pictures embedding
\usepackage{graphicx}
% pdf appendix embed
\usepackage{pdfpages}
% appendix package
\usepackage[toc, page]{appendix}
% allows forcing figure placement
% thanks https://tex.stackexchange.com/a/8633
\usepackage{float}
% glossary and acronyms also in table of content
\usepackage[toc, acronym]{glossaries}
% rename appendices to localize since was not done
% REMOVE IF USING ENGLISH ONLY TO LOCALIZE
\renewcommand\appendixtocname{Anhang}
\renewcommand\appendixpagename{Anhang}
% for biliography in toc
% REMOVE IF USING ENGLISH ONLY TO LOCALIZE
\DefineBibliographyStrings{german}{
bibliography = {Referenzen},
}
% Number sections into second level for toc
% first level is section so give everything up to subsubsection numbers
\setcounter{secnumdepth}{3} % can also reduce or increase
% for some fancy tabbing modifiers and so on needed
% \usepackage[parfill]{parskip}
\title{
My awesome paper \newline
Lorem Ipsum
}
\shorttitle{My awesome paper – Lorem Ipsum}
\author{Max Mustermann – Group 1337}
\affiliation{Julius-Maximilians Universität}
% \date{Februar 2020}
\keywords{keywordOne,lorem,ipsum}
% able to cut down to page limits with this margin trick
% especially thick 2.5cm bottom margin can be reduced
%\geometry{bottom=1.7cm}
% possible values: left,right,bottom,top,hmargin,vmargin
% accepts centimeters as cm and inches as in
% thanks https://tex.stackexchange.com/a/483040
% only use this while writing on large files
% and want to save time at compilation on save
% many images blow up size if compression is disabled here
% and if compression is enabled they blow up build time
% final pdf should be gzipped so comment out then
% \special{dvipdfmx:config z 0}
%%%%%%% Glossary %%%%%%%%%%
\makeglossaries
\newacronym{yaml}{YAML}{Yet Another Markup Language}
\newglossaryentry{maths}
{
name=mathematics,
description={Mathematics is what mathematicians do}
}
\begin{document}
\maketitle
\newpage
% disables page numbering and shorttitle show on table of content pages
% thanks to https://tex.stackexchange.com/a/2996
\addtocontents{toc}{\protect\thispagestyle{empty}}
\tableofcontents
\newpage
\setcounter{page}{1}
\section{Summary}
\subfile{sections/summary}
\newpage
\section{Section One}
\subfile{sections/sectionOne}
\newpage
% other more space efficient way to seperate sections
% \vspace*{0.5 cm}
\section{Section Two}
\subfile{sections/sectionTwo}
%%%%%%%%%% Glossary and Acronyms %%%%%%%%
% see https://www.overleaf.com/learn/latex/Glossaries
\newpage
\printglossary[title=Glossar, toctitle=Glossar]
\printglossary[type=\acronymtype, title=Akronyme, toctitle=Liste der Akronyme]
%%%%%%%%%%% Bilbiography %%%%%%%%%%%%%%
\newpage
% Use single whole bibliography info
% can also split into keywords for sections and print multiples
\printbibliography[heading=bibintoc]{sources}
%%%%%%%%%%% Appendices %%%%%%%%%%%%%%
\newpage
\begin{appendices}
% reset section counter to be 1 since A prefix is added automatically in appendice
% and want it to start with A-1
\setcounter{section}{1}
% Pdf appendix
\begingroup
\centering
\includepdf[scale=0.85,pages={1},pagecommand=\subsection{Lorem Ipsum}]{appendix/lorem-ipsum.pdf}
\label{append:lorem_ipsum}
% REST OF THE PAGES AFTER FIRST WITH SAME FILE NAME HERE
% example pdf only has one page
% \includepdf[pages={2-}]{appendix/lorem-ipsum.pdf}
\endgroup
% Image appendix
\newpage
\subsection{Example Picture appendix}
\begingroup
% this figure floats; can also be t! for top or b! for bottom
\begin{figure}[h!]
\centering
\label{append:pic:one}
\includegraphics[width=0.9\textwidth]{appendix/imageExample/pOne.jpg}
\caption{Image description for image One.}
\end{figure}
\newpage
% this figure has forced non float positioning from float package
\begin{figure}[H]
\centering
\label{append:pic:two}
\includegraphics[width=0.9\textwidth]{appendix/imageExample/pTwo.jpg}
\caption{Image description for image Two.}
\end{figure}
\endgroup
% tabel appendix
\newpage
\begingroup
\subsection{Example Table}
\subsubsection{First table}
\label{append:example_table}
\begin{center}
\begin{tabular}{ |c|c| }
\hline
quismagnacondimentum & Count \\
\hline
tinciduntindapibus & 12 \\
Cumsociisnatoque & 18 \\
magnisdisparturient & 5 \\
ridiculusmus & 1 \\
\hline
\end{tabular}
\end{center}
\endgroup
% Another pdf appendix
\newpage
\begingroup
\centering
\includepdf[scale=0.8,pages={1},pagecommand=\subsection{Lorem Ipsum – Information}]{appendix/lorem-ipsum-info.pdf}
\label{append:ipsum_info}
% REST OF THE PAGES AFTER FIRST WITH SAME FILE NAME HERE
% example pdf only has one page
% \includepdf[pages={2-}]{appendix/lorem-ipsum-info.pdf}
\endgroup
\end{appendices}
\end{document}