-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdemo.tex
209 lines (161 loc) · 6.25 KB
/
demo.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
\documentclass[a4paper,11pt]{memoir}
\ifpdf
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\fi
\usepackage[english]{babel}
% This is the only file needed for actually using the smart-thesis style.
\input{style}
% Contains some packages which are commonly used in a thesis.
% Note that these are optional.
\input{common-packages}
% Contains some macros which are commonly used in a thesis.
% Note that these are optional.
\input{common-macros}
% These packages are only used in the demo and not necessarily
% required for smart-thesis.
\usepackage{blindtext}
% Loads bibliography for citations.
\addbibresource{demo-bibliography.bib}
% Starts creation of a glossary.
\makeglossaries
\input{demo-glossary}
% Define all the metadata to be listed in \smarttitle and \smartcopyright
\thesistype{Master Thesis}
\discipline{Intelligent Systems}
\title{A Truly Magnificent Demo of the \LaTeX\ Smart Thesis Template With Respect to Long Titles and Incredibly Fascinating Blindtext}
\author{Jan Philip Göpfert,Andreas Stöckel}
\institution{University of GNU,Faculty of Templates,\TeX\ Group}
\supervisors{Prof.\@~Dr.-Ing.\@~Jane Doe,M.Sc.\@~John Doe}
\internalid{M13}
\begin{document}
\frontmatter
\smarttitle
\smartcopyright{This LaTeX template is published under the Creative Commons Zero license. To the extent possible under law, the authors have waived all copyright and
related neighboring rights to Smart Thesis. This work is published from: Germany.}
\smartinitialepigraph{The secret of getting ahead is getting started.}{Mark Twain}
\tableofcontents
\mainmatter
\chapter{A multitude of tests}
\epigraph{Science is what we understand well enough to explain to a computer. Art is everything else we do.}{Donald E. Knuth}
\blindtext
\begin{figure}
\small
\centering
\begin{tikzpicture}
\begin{axis}
\addplot coordinates{(0,0) (1,2)};
\addplot coordinates{(0,1) (1,3)};
\addplot coordinates{(0,2) (1,4)};
\addplot coordinates{(0,3) (1,5)};
\addplot coordinates{(0,4) (1,6)};
\addplot coordinates{(0,5) (1,7)};
\end{axis}
\end{tikzpicture}
\caption{Just a fancy test for auto-coloring of graphs}
\end{figure}
\section{Some math}
\marginnote{This formula is also known as \emph{Pythagorean Theorem}, albeit it is usually written with the variables $a$, $b$, and $c$.}
Here follows some tests for typesetting math. Note how we use the \texttt{\\marginnote} command to add some pretty notes which appear in the margin. This is quite nice, as it allows a more narrow width of the text body without the page looking too sparse\footnote{This is a footnote}. Here comes our first equation
\begin{align}
z^2 &= x^2 + y^2 \\
z &= \sqrt{x^2 + y^2} \,.
\end{align}
\pagebreak
\marginnote{Did you know? The discrete fourier transformation shown in equation \ref{eqn:dft} is the backbone of the modern information-society.}
And here comes some more math, this time a discrete Fourier transformation (DFT) which is a little bit more sophisticated than the last example\footnote{More is always better!}:
\begin{align}
f_m = \sum_{k=0}^{2n-1} x_k \, e^{-\frac{2\pi i}{2n} mk } \label{eqn:dft}
\qquad
m = 0,\dotsc,2n-1 \,.
\end{align}
For words of science, see \cite{botsch2010polygon}. Unfortunately, that book has nothing about \glspl{wolf}.
\begin{figure}
\small
\centering
\begin{tikzpicture}
\begin{axis}[
axis lines=left,
scaled ticks=false,
xticklabel style={
rotate=90,
anchor=east,
/pgf/number format/precision=3,
/pgf/number format/fixed,
/pgf/number format/fixed zerofill,
},
]
% density of Normal distribution:
\newcommand\MU{0}
\newcommand\SIGMA{0.1}
\addplot+[mark=none,domain=-3*\SIGMA:3*\SIGMA,samples=201]
{exp(-(x-\MU)^2 / 2 / \SIGMA^2)
/ (\SIGMA * sqrt(2*pi))};
\end{axis}
\end{tikzpicture}
\caption{Gaussian distribution. This plot shows a guassian distribution with mean $\mu = 0$ and standard deviation $\sigma = 0.1$. As clearly visible, the value of the distribution never reaches zero.}
\label{fig:gaussian_distr}
\end{figure}
\section{Even more tests}
\marginnote{Blood-red were his spurs i' the golden noon; wine-red was his velvet coat, when they shot him down on the highway, down like a dog on the highway, and he lay in his blood on the highway, with the bunch of lace at his throat.}
\blindtext
\subsection{A test of three parts}
\blindtext
\chapter{Another test chapter}
\begin{algorithm}
\small
\begin{shaded}
\begin{algorithmic}[1]
\newcommand*{\To}{\textbf{to}\xspace}
\newcommand*{\Init}{\State\textbf{init}\xspace}
\newcommand*{\B}{\mathcal{B}}
\Init \(M \gets 0 \in \B^{N \times r}\) \Comment{Result matrix}
\For{ \(i \gets 1\) \To N}
\For{ \(j \gets r - r_1 + 1\) \To \(r\)}
\State \(\ell \gets \) \Call{RandomSelect}{$\{1, \ldots, j - 1\}$} \Comment{Uniformly select set entry}
\If{\({M}[i,\ell] = 1\)}
\State \({M}[i,j] \gets 1\)
\Else
\State \({M}[i,\ell] \gets 1\)
\EndIf
\EndFor
\EndFor
\end{algorithmic}
\end{shaded}
\caption[Uncorrelated random data generation]{Algorithm for the generation of a block $M$ of $N$ uncorrelated random vectors of length $r$, containing exactly $r_1$ ones.}
\label{alg:binam_random_data}
\end{algorithm}
\epigraph{To test is to live. To believe is to die.}{Anonymous Heretic}
\marginnote{Yes, this is just a test. If you read this, you are most likely doomed.}
\blindtext
\begin{figure}
\centering
\includegraphics[width=8cm]{demo.png}
\caption{Truly a fine canister, comparable only to \gls{mjollnir}.}
\label{fig:canister}
\end{figure}
\Blindtext\Blindtext
A picture says more than a thousand words (see \ref{fig:canister}).
\section{The Throat of the World}
\marginnote{Margin notes help to add structure to long runs of text}
\blindtext
\blindlistlist[2]{itemize}
\section{The Silence Has Been Broken}
\marginnote{Test test test}\blindtext
\blindlistlist[2]{enumerate}
\section{Discerning the Transmundane}
\marginnote{You can even add small formulas, like this one:
\begin{align*}
\sum_{i=1}^{n} i &= n \cdot \frac{n + 1}2
\end{align*}}
\blindtext
\subsection{Composure, Speed, and Precision}
\marginnote{Or this one:
\begin{align*}
E &= mc^2
\end{align*}}
\blindtext
\backmatter
\printglossaries
\printbibliography[heading=bibintoc]
\end{document}