-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tex
288 lines (248 loc) · 7.43 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
% Document properties
\documentclass[a4paper, finnish, 12pt, twoside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[finnish]{babel}
% Citations
\usepackage[backend=biber,style=numeric,sorting=none]{biblatex}
\addbibresource{lahdeluettelo.bib}
\usepackage{csquotes}
% LaTeX Packages
% Sorted by name
\usepackage{amsmath} % Equations
\usepackage{amsfonts} % Just in case to ensure better symbol fonts
\usepackage{amssymb} % Mathematical symbols, \mathbb{}
\usepackage{array} % Arrays
\usepackage{bm} % Bold vector symbols
% \usepackage{cite} % Source citations
\usepackage{emptypage} % Clears unwanted artifacts from empty pages
\usepackage{esint} % Symbols for integrals over closed lines (kiertointegraali) \oint \oiint
\usepackage{fancyhdr} % For custom header style
\usepackage{gensymb} % For degree sign
\usepackage{graphicx} % For including pictures
\usepackage{hyperref} % Hyperlinks
\usepackage{longtable} % Tables that span multiple pages: \longtable, required by longtabu
\usepackage{mathrsfs} % For Fourier transform symbol \mathscr{F}. A Laplace transform symbol \mathscr{L} is also available.
\usepackage{multirow} % Table cells spanning multiple rows: \multirow
\usepackage{pslatex} % Makes the PDF output look better
\usepackage{tabu} % Tables that span the whole page width: \tabu, and multiple pages: \longtabu
% \usepackage{tabularx} % Tables that span the whole page width: \tabularx
\usepackage{titletoc,tocloft} % For styling Table of Contents
\usepackage{titlesec} % For styling \part headers
\usepackage{xifthen} % Expanded if-else-logic for functions, \ifthenelse for example
% Define margins
\usepackage[inner=3cm, outer=2.5cm]{geometry}
% Define Table of Contents style
\setcounter{tocdepth}{2}
\setlength{\cftsubsecindent}{4.5em}
\dottedcontents{section}[3em]{}{1.3em}{.6em}
% Define \part header style
\titleclass{\part}{top} % Make \part like a chapter
\titleformat{\part}
[display]
{\centering\normalfont\huge\bfseries}
{\titlerule[3pt]\vspace{3pt}\titlerule[1pt]\vspace{3pt}\MakeUppercase{\partname} \thepart}
{0pt}
{\huge\MakeUppercase}
[\vspace{-0.5em}\rule{\textwidth}{2pt}]
% Define the amount of whitespace to come after \part
\titlespacing*{\part}{0pt}{0pt}{40pt}
% Custom command for fetching the part name to the header
\newcommand*\parttitle{}
\let\origpart\part
\renewcommand*{\part}[2][]{%
\ifx\\#1\\% optional argument not present?
\origpart{#2}%
\renewcommand*\parttitle{#2}%
\else
\origpart[#1]{#2}%
\renewcommand*\parttitle{#1}%
\fi
}
% Preventing problems caused by the Unicode non-breaking space character
% Without this declaration the compiler would crash if the user has inserted such character by mistake
% Now it just generates an error text
\DeclareUnicodeCharacter{00A0}{UNICODE_ERROR}
%-----
% Environment and command definitions
% It's highly recommended to use these whenever possible so that the style of the whole document can be changed from here
% Column types for tables
\newcolumntype{M}{ >{$} l <{$} }
\newcolumntype{D}{ >{$\displaystyle} l <{$} }
\newcolumntype{Y}{ >{$\displaystyle} X <{$} }
% Basic table for physical constants
\newenvironment{consttable}[1]{
\begin{table}[!ht]
\centering
\caption{#1}
\setlength{\extrarowheight}{5pt}
\begin{tabu} to \textwidth {X | M | Y | p{2.2cm} }
\hline
}{
\end{tabu}
\end{table}
}
% Basic table for label & equation
\newenvironment{eqtable}[1]{
\begin{table}[!ht]
\centering
\caption{#1}
\setlength{\extrarowheight}{10pt}
\begin{tabular}{ l | D }
\hline
}{
\end{tabular}
\end{table}
}
% Basic table for label & equation, full page width
\newenvironment{eqtable-full}[1]{
\begin{table}[!ht]
\centering
\caption{#1}
\setlength{\extrarowheight}{10pt}
\begin{tabu} to \textwidth { l | >{$\displaystyle} X <{$} }
\hline
}{
\end{tabu}
\end{table}
}
% Basic table with columns for symbol and units
\newenvironment{eqtable-units}[1]{
\begin{table}[!ht]
\centering
\caption{#1}
\setlength{\extrarowheight}{10pt}
\begin{tabular}{| l | M | l | M |}
\hline
}{
\hline
\end{tabular}
\end{table}
}
% Basic table for math without labels
\newenvironment{mathtable}[1]{
\begin{table}[!ht]
\centering
\caption{#1}
\setlength{\extrarowheight}{10pt}
\begin{tabular}{ D }
\hline
}{
\end{tabular}
\end{table}
}
% Basic table for math without labels, full width
\newenvironment{mathtable-full}[1]{
\begin{table}[!ht]
\centering
\caption{#1}
\setlength{\extrarowheight}{10pt}
\begin{tabu}{ Y }
\hline
}{
\end{tabu}
\end{table}
}
% Matrix with style that can be changed from here
\newenvironment{styledmatrix}{
\setlength{\extrarowheight}{0pt}
\begin{bmatrix}
}{
\end{bmatrix}
}
% Systems of multiple equations (yhtälöryhmä)
\newenvironment{eqgroup}{
\setlength{\extrarowheight}{0pt}
\begin{cases}
}{
\end{cases}
}
% Inexact differential for thermodynamics
% https://en.wikipedia.org/wiki/Inexact_differential
\newcommand{\dbar}{\ensuremath{\mathchar'26\mkern-12mu d}}
% Inner product
\newcommand{\innerp}[2]{
\langle \bm{#1}, \bm{#2} \rangle
}
% Laplace transform
\newcommand{\laplace}[1]{
\ifthenelse{\isempty{#1}}{
\mathcal{L}
}{
\mathcal{L} \{ #1 \}
}
}
% Partial derivative when some variable stays constant
% For physical chemistry
\newcommand{\partialat}[3]{
\Big( \frac{\partial #1}{\partial #2} \Big)_{#3}
}
%-----
% Document metadata
\title{Linnunradan käsikirja teekkareille}
\author{Tampereen teekkarit}
\date{\the\day.\the\month.\the\year}
\begin{document}
% Title page
\begin{titlepage}
\centering
{\huge Linnunradan käsikirja teekkareille \par}
% {\large Tampereen teekkarit \par}
{\the\day.\the\month.\the\year \par}
\vfill
\includegraphics{by-sa.eps}
\end{titlepage}
\pagenumbering{roman} % Start with roman numbers
% Foreword
Maailma on kaavoja ja taulukoita täynnä, mutta ne ovat olleet hajallaan useissa kirjoissa,
joista tiedon etsiminen on hidasta - varsinkin paperiversioista, joissa Ctrl+F ei luonnollisesti toimi.
Lisäksi monet niistä ovat tiukkojen tekijänoikeuksien ja kopiokieltojen alaisia,
vaikka tieto itsessään on vapaata. Nyt niille on vaihtoehto. Ole hyvä.
% Disclaimer
Tämä kirja on opiskelijaprojekti, joten emme voi ottaa vastuuta mahdollisista virheistä.
Toivommekin, että ilmoitat niistä vaikkapa \href{https://github.com/AgenttiX/compendium}{GitHubin} kautta, jotta voimme korjata ne.
% Credits
\begin{table*}[h!]
\centering
\begin{tabular}{ll}
Mika \textit{AgenttiX} Mäki & Projektin perustaja \\
Daniel \textit{Ohems} Saarimäki \\
% Add name here % Add title here
\end{tabular}
\end{table*}
% License
\vfill
{
\centering
\href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Attribution-ShareAlike 4.0 International}
\par
}
% Table of Contents
\pagebreak
\tableofcontents
\vfill % Prevents TOC from expanding to full page height
% Define header
\pagestyle{fancy}
\fancyhead{}
\fancyhead[LO,RE]{\MakeUppercase{\textit{\parttitle}}}
\fancyhead[RO,LE]{\nouppercase{\textit{\rightmark}}}
\fancyfoot{}
\fancyfoot[C]{\thepage}
% Main content
\pagebreak
\pagenumbering{arabic} % Switch back to arabic page numbers
\include{matematiikka}
\include{fysiikka}
\include{kemia}
\include{tietotekniikka}
% Citations
\pagebreak
\renewcommand{\headrulewidth}{0pt} % Clear header line
\fancyhead{} % Clear header
\setcounter{secnumdepth}{-1} % Don't add numbers to chapters
\addcontentsline{toc}{part}{Viitteet}
% \bibliography{lahdeluettelo} % Citation source
% \bibliographystyle{IEEEtran} % Citation style
\printbibliography
\markboth{\bibname}{\bibname} % Set page header
\end{document}