-
Notifications
You must be signed in to change notification settings - Fork 6
/
Vorlage.tex
231 lines (182 loc) · 6.23 KB
/
Vorlage.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
% !TeX program = xelatex
% !TeX encoding = utf8
% !TeX root = Vorlage.tex
\documentclass[margin=normal]{hsrzf}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Packages
%% The OST Student's package
\usepackage{oststud}
%% Language configuration
\usepackage{polyglossia}
\setdefaultlanguage[variant=swiss]{german}
\setotherlanguage{english}
%% License configuration
\usepackage[
type={CC},
modifier={by-nc-sa},
version={4.0},
lang={german},
]{doclicense}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Metadata
\course{Elektrotechnik}
\module{ModAbk}
\semester{Fr\"uhlingssemester 2020}
\authoremail{[email protected]}
\author{\textsl{Vorname Name} -- \texttt{\theauthoremail}}
% did someone help you with this work?
\contributors{
% I created this template, does that count?
Naoki Pross
% do not forget to add yourself!
}
\title{\texttt{\themodule} Zusammenfassung}
\date{\thesemester}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Document
\begin{document}
% use roman numberals for introductiory pages
\pagenumbering{roman}
\maketitle
% \begin{abstract}
% \end{abstract}
% show the names of the people who contributed to this document.
% \section*{Contributors}
% \thecontributors
\section*{Lizenz}
\doclicenseThis
\tableofcontents
% actual content
\clearpage
\setcounter{page}{1}
\pagenumbering{arabic}
% I like to use 2 columns, you can remove this line to have one column.
\twocolumn
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Sample content
\begin{english}
\section{How to use this template}
\subsection{Introduction}
This template is built on top of the
\texttt{\textcolor{OSTBlackberry}{OST}stud} package, which provides many
useful features such as sane defaults and nice macros (see
\S\ref{sec:howto:sample}). The complete documentation can be found at
\begin{center}
\url{https://ctan.org/pkg/oststud}
\end{center}
By default the main language is German and the secondary language is English,
you can change this on top of the document by editing the lines
\lstinline|\setotherlanguage{}| and \lstinline|\setmainlanguage{}|. Further
the default license is CC-BY-NC, also in German. This can also be changed by
configuring the options of the \texttt{doclicense} package.
\subsection{Examples} \label{sec:howto:sample}
Here are some examples of the features provided by the
\texttt{\textcolor{OSTBlackberry}{OST}stud} package.
\subsubsection{Electrodynamics and Physics}
The notation for vectors is ispired the notation of Prof. H.D. Lang. As we
know Faraday's law in its integral form is
\[
\oint_{\partial A} \vec{E} \dotp d\vec{l}
= -\frac{d}{dt} \int_A \vec{B} \dotp d\vec{s},
\]
however, anyone who has taken ELT3 knows that this expression can become very
painful very fast. Thus, we consider only the harmonic solutions in the
frequency domain by Fourier transforming this expression, i.e. we define
$\underline{\vec{E}}(\omega) = \fourier\{\vec{E}(t)\}$ and similarly
$\underline{\vec{B}}(\omega) = \fourier\{\vec{B}(t)\}$ using the convention
such that
\[
\frac{d}{dt} \vec{E}
\quad\corresponds\quad
j\omega \underline{\vec{E}}.
\]
This is particularly useful for solving the electromagnetic Wave equation
\[
\vlaplacian \vec{\tilde{E}} - \mu\sigma \partial_t \vec{\tilde{E}}
- \mu\varepsilon \partial_t^2 \vec{\tilde{E}} = \vec{0},
\]
since the time derivatives become $j\omega$ and $\omega^2$. Then as you will
learn for e.g. in the ElMag course $\underline{\vec{\tilde{H}}} = - \curl
\underline{\vec{\tilde{E}}} / j\omega \mu_0$).
\subsubsection{Mathematical Programming}
Electrical engineers also work with a lot of mathematical programming and
optimization problems, such as the linear quadratic regulator controller
\[
\vec{u}^\star = \argmin_{\vec{u}} \int_0^\infty
\mt{\vec{x}} \mx{Q} \vec{x} + \mt{\vec{u}} \mx{R} \vec{u} \, dt,
\]
or Newton's method
\[
\vec{x}_{k+1} = \vec{x}_k + \minv{\mx{H}_f}(\vec{x}_k) \grad f(\vec{x}_k)
\]
where $f: \mathbb{R}^m \to \mathbb{R}$ and $\vec{x}_0$ is the initial guess.
\subsubsection{Software and Code}
We do a lot of maths, but sometimes we also write real code, either using
really painful langauges such as C\texttt{++} or pseudocode
(\textsc{Python}). For example see Fig. \ref{fig:cpp-code}.
\begin{figure*}
\begin{lstlisting}[language=c++]
#pragma once
#include <memory>
#include <set>
namespace flat {
namespace core {
enum class priority_t : unsigned {
max = 0,
higher = 1,
high = 2,
none = 3,
low = 4,
lower = 5,
min = 6,
};
class prioritized {
public:
const priority_t priority;
prioritized(priority_t p = priority_t::none) : priority(p) {}
};
struct prioritize {
bool operator()(const prioritized& lhs, const prioritized& rhs) {
return lhs.priority < rhs.priority;
}
bool operator()(const std::weak_ptr<prioritized> lhs,
const std::weak_ptr<prioritized> rhs) {
if (auto l = lhs.lock()) {
if (auto r = rhs.lock()) {
// if both valid, check their priority
// in case they are the same, left is prioritized
return l->priority < r->priority;
} else {
// if right is expired, left is prioritized
return true;
}
} else {
// if left is expired, the right is prioritized
return false;
}
}
};
template<typename Prioritized>
using queue = std::multiset<Prioritized, prioritize>;
}
}
\end{lstlisting}
\caption{
An abomination written in modern C\texttt{++}.
\label{fig:cpp-code}
}
\end{figure*}
\subsection{Example of documents}
On HSR-Stud's GitHub organization you can find more documents written using
(possibly an older version of) this template. For example:
\begin{itemize}
\item \url{https://github.com/HSR-Stud/RegT4}
\item \url{https://github.com/HSR-Stud/FuVar}
\item \url{https://github.com/HSR-Stud/DigDes_2021}
\end{itemize}
Feel free to go there and improve them if you find missing sections or
errors.
\end{english}
% End of sample content
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}