Initial push of previous course
This commit is contained in:
3
example-document/doc/appendix.tex
Normal file
3
example-document/doc/appendix.tex
Normal file
@@ -0,0 +1,3 @@
|
||||
\section{The Appendix}
|
||||
|
||||
\lipsum[1]
|
||||
71
example-document/doc/figs-and-tables.tex
Normal file
71
example-document/doc/figs-and-tables.tex
Normal file
@@ -0,0 +1,71 @@
|
||||
\section{Figures and tables}
|
||||
|
||||
\subsection{Figures}
|
||||
|
||||
\begin{figure}[!h]
|
||||
\centering
|
||||
\includegraphics[width=\linewidth]{figures/abc.png}
|
||||
% \linewidth refers to the "current line" which may be different from \textwidth which is the text area in general
|
||||
% \includegraphics{figures/abc.png}
|
||||
\caption{The caption of the figure}
|
||||
\label{fig:abc_figure} % Tells the compiler that this environment can be referenced and pointed to
|
||||
\end{figure}
|
||||
|
||||
% The \ref{} command fetches the relevant number and makes it show up in the outputted pdf.
|
||||
A reference to figure \ref{fig:abc_figure}.
|
||||
|
||||
\begin{figure}[!htbp]
|
||||
\centering % Centering is done within the text area
|
||||
% pdf's may be shown as graphics, especially nice if the pdf is vector based and therefore scalable
|
||||
\includegraphics[width=1.05\textwidth]{figures/p2b-real-zt.pdf} % It is too wide to be contained in the text area
|
||||
\caption{The caption of the other figure, we can show pdf's which may or may not be vector graphics.}
|
||||
\label{fig:other_figure}
|
||||
\end{figure}
|
||||
|
||||
% \begin{env_name}{first_arg}{second_arg}
|
||||
% First argument for wrapfigure is figure justification
|
||||
% l: left, r: right, c: center, o: outer, i: inner
|
||||
% outer and inner are applicable for books
|
||||
% Second argument for wrapfigure is figure width
|
||||
% redefines linewidth within the environment
|
||||
\begin{wrapfigure}{l}{0.33\textwidth} % .33\textwidth defines a new linewidth for this env
|
||||
% \centering % Centering is done within the environment and overrides the l justification
|
||||
\includegraphics[width=0.5\linewidth]{figures/abc.png}
|
||||
% .5\linewidth uses only half of the space available
|
||||
\caption{A third figure, but still the same picture. I }
|
||||
\label{fig:third_figure}
|
||||
\end{wrapfigure}
|
||||
|
||||
\newpage
|
||||
\subsection{Tables}
|
||||
|
||||
\begin{table}[!htbp]
|
||||
\setstretch{0.5} % Huddles lines closer together; it's cold outside
|
||||
\centering % Centers on the page
|
||||
\caption{Linking equations with desired functionality and proper function name in python.} % The caption may be put above instead of below
|
||||
\vspace{2mm}
|
||||
\begin{tabular}{clr} % c: center; l: left; r: right; |: v-line
|
||||
\hline % Inserts a horizontal line
|
||||
Equation & Action & Function name \\
|
||||
\hline
|
||||
\ref{eq:forward_sweep} & Forward sweep & \verb|getZ| \\
|
||||
\ref{eq:forward_sweep} & Approximate values from the ANN & \verb|getUpsilon| \\
|
||||
&&\\
|
||||
\ref{eq:first_back_prop} & Start back propagation & \verb|getPK| \\
|
||||
\ref{eq:back_prop} & Rest of the back propagation & \verb|getP| \\
|
||||
\\
|
||||
\ref{eq:Yc} & $Y_c$ simplification & \verb|getYc| \\
|
||||
\ref{eq:nu} & $\nu$ simplification & \verb|getNu| \\
|
||||
\ref{eq:Hk} & $H^{(k)}$ simplification & \verb|getHk| \\
|
||||
\\
|
||||
\ref{eq:my_del_J} & Computation of $\nabla_\theta J$ & \verb|getdelJ| \\
|
||||
\ref{eq:update_theta} & Updating \(\theta\) & \verb|updateTheta| \\
|
||||
\hline
|
||||
\end{tabular}
|
||||
\label{tab:eq_fn_lookup_table}
|
||||
\end{table}
|
||||
|
||||
% The {fig:...}, {tab:...} and {eq:...} aren't required, but will help differentiating what is being references. Maybe a figure and a table have very similar names, then the fig: and tab: prefixes allow you to separate them.
|
||||
Referencing the table as table \ref{tab:eq_fn_lookup_table}.
|
||||
|
||||
\lipsum[1-2]
|
||||
132
example-document/doc/math.tex
Normal file
132
example-document/doc/math.tex
Normal file
@@ -0,0 +1,132 @@
|
||||
\section{Math}
|
||||
|
||||
\subsection{Equation}
|
||||
|
||||
This is an equation
|
||||
|
||||
\begin{equation}
|
||||
% A lonesome ( will have a fixed size
|
||||
% But a \left( will be scaled to contain whatever it has to
|
||||
\langle f, g \rangle_{\left[a, b\right]}
|
||||
=
|
||||
\int_a^b f(x)\overline{g(x)} dx
|
||||
% \\ % The equation env ignores \\
|
||||
% a^2 + b^2 = c^2
|
||||
\label{eq:inner_product} % You may label equations for referencing later
|
||||
\end{equation}
|
||||
|
||||
\subsection{Gather}
|
||||
|
||||
This is the gather environment
|
||||
|
||||
\begin{gather*}
|
||||
E = mc^2
|
||||
\\
|
||||
E^2 =
|
||||
\frac{ % You
|
||||
mc^2 % May
|
||||
} % Use
|
||||
{ % As
|
||||
\sqrt{ % Many
|
||||
1 % Lines
|
||||
- % As
|
||||
\frac{ % You
|
||||
v^2 % Want
|
||||
}
|
||||
{ % Sometimes
|
||||
c^2 % It makes
|
||||
} % Things more
|
||||
} % Structured
|
||||
} % ...though not always...
|
||||
\end{gather*}
|
||||
|
||||
\subsection{Align}
|
||||
|
||||
This is an \emph{anonymous} align environment
|
||||
|
||||
\begin{align*}
|
||||
24 &= 8 \cdot 3 \\ % Allows aligning glyphs by using &
|
||||
&= 4 \cdot 6 \\ % The glyph marked with & on each line
|
||||
&= 2 \cdot 2 \cdot 2 \cdot 3 % Will be aligned
|
||||
\end{align*}
|
||||
|
||||
\subsection{Inlined math}
|
||||
|
||||
% Math can be inlined with \( ..my math.. \) or $..also my math..$
|
||||
% $_$ is the old TeX way and is not advisable to use
|
||||
% \(_\) is the more modern LaTeX way and is more robust
|
||||
A \(\sum_n^k\) sum! And a $\frac{1}{n}$.
|
||||
|
||||
% The \[\] is a \displaystyle math environment
|
||||
% There is no real reason to use it over the \begin syntax, but it's there. This env is displayed on its own line and is not a part of the paragraph in the same way $_$ and \(\) are.
|
||||
You can also: \[\alpha\] do this.
|
||||
|
||||
\subsection{Some symbols}
|
||||
|
||||
Greek
|
||||
|
||||
\begin{gather*}
|
||||
\psi,\ \Psi % The "\ " thing forces the insert of a space, otherwise whitespace is ignored
|
||||
\\
|
||||
\alpha, \beta, \gamma, \delta % Lower case with _small_ letters
|
||||
\\
|
||||
\Gamma, \Delta % Upper case with _Capital_ letter
|
||||
\\
|
||||
\epsilon, \varepsilon % Variants with _var_
|
||||
\end{gather*}
|
||||
|
||||
Other things
|
||||
|
||||
% If you want a glyph, but don't know what it's called
|
||||
% Either try something (most glyphs have sensible names)
|
||||
% Or just search it up online, after a while you'll remember
|
||||
\begin{gather*}
|
||||
\nabla, \partial
|
||||
\\
|
||||
\int, \iint, \oint
|
||||
\\
|
||||
\sum_{i = 1}^{n}, \prod_{1 \leq i \leq n}
|
||||
\\
|
||||
\frac{a + ib}{c + id}, i = 1, \dots, n
|
||||
\\
|
||||
\bar{x}, \vec{x}, x^\circ
|
||||
\end{gather*}
|
||||
|
||||
Matrices (and vectors)
|
||||
|
||||
\begin{gather*}
|
||||
\begin{pmatrix} % Parantheses
|
||||
1 & 2 & 3 \\ % Columns separated with &
|
||||
4 & 5 & 6 \\ % Rows separated with \\
|
||||
7 & 8 & 9
|
||||
\end{pmatrix}
|
||||
,
|
||||
\begin{bmatrix} % Brackets
|
||||
1 & 2 & 3 \\
|
||||
4 & 5 & 6 \\
|
||||
7 & 8 & 9
|
||||
\end{bmatrix}
|
||||
,
|
||||
\begin{Bmatrix} % _Curly_ brackets
|
||||
1 & 2 & \\ % You can leave elements empty
|
||||
4 & \displaystyle\int_0^1x^2 dx & 6 \\ % You can make the elements complicated (and force roomy display with \displaystyle
|
||||
7 & 8 & 9
|
||||
\end{Bmatrix}
|
||||
,
|
||||
\begin{pmatrix} % Essentially a vector
|
||||
x_1 \\ x_2 \\ x_3 % Just because \\ causes linebreak, doesn't mean you need a new line in the source
|
||||
\end{pmatrix}
|
||||
\end{gather*}
|
||||
|
||||
% Defining a new command, don't do it here, do it in the preamble or something similar
|
||||
% newcommand takes a command name, a number of arguments and the "function body" of the command. The arguments to the new command being defined can be accessed by #<number>
|
||||
\newcommand{\myvec}[1]{
|
||||
\begin{pmatrix}
|
||||
#1
|
||||
\end{pmatrix}
|
||||
}
|
||||
|
||||
% Works like a charm
|
||||
\begin{gather*}
|
||||
\myvec{x_1\\x_2\\x_3} \leftarrow \text{My vector command}
|
||||
\end{gather*}
|
||||
13
example-document/doc/referencing.tex
Normal file
13
example-document/doc/referencing.tex
Normal file
@@ -0,0 +1,13 @@
|
||||
\section{Referencing}
|
||||
|
||||
I hereby cite \cite{einstein}. % Tells the compiler to put a citation link here
|
||||
I can also cite \cite{dirac}. % The only citation of dirac, if we remove it, dirac won't show in the References section
|
||||
|
||||
% If you're quoting larger passages from your sources, consider putting them in the
|
||||
% "quote" environment
|
||||
\begin{quote}
|
||||
This is a quote which cites %\cite{einstein}
|
||||
\end{quote}
|
||||
|
||||
% Small phrases may be quoted inline with "enquote"
|
||||
I may also \enquote{quote} my sources \cite{einstein}.
|
||||
45
example-document/doc/text.tex
Normal file
45
example-document/doc/text.tex
Normal file
@@ -0,0 +1,45 @@
|
||||
\section{Normal Text} % Top-level heading
|
||||
|
||||
\subsection{Level 2} % For divisioning each part/section/chapter for structure
|
||||
|
||||
\subsubsection{Level 3} % Second order structure
|
||||
|
||||
% \subsubsubsection{Level 4} % This doesn't work, as it doesn't exist
|
||||
% If you need a fourth level heading, consider just _not_ doing it
|
||||
% There may exist packages for it, if you're adamant
|
||||
|
||||
This is a paragraph.
|
||||
This is in the same paragraph.
|
||||
This is still in the same paragraph. % An empty line breaks into a new paragraph
|
||||
|
||||
This is another paragraph, however. % \\ forces a linebreak which will come in addition to the "new paragraph" break
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\begin{itemize} % Says that what exists inside of here is a bulletpoint list
|
||||
\item It is possible to \emph{italicize} text with \verb|\emph{}|.
|
||||
\item It is possible to \textbf{boldface} text with \verb|\textbf{}|.
|
||||
\item It is possible \textbf{to \emph{nest} these} effects.
|
||||
\end{itemize}
|
||||
|
||||
If you wish to write an entire paragraph, you may write everything on one line. With line-wrapping, this becomes trivial, as it even looks like paragraph. However, for the love of God, do not do this, as it is impossible to debug, should some of your inline things be weird. In addition, version-control systems like git are much more powerful when you use more lines.
|
||||
|
||||
\subsection{Lists}
|
||||
|
||||
\begin{enumerate}
|
||||
\item First
|
||||
\item Second
|
||||
\item Third
|
||||
\begin{enumerate}
|
||||
\setlength{\itemsep}{-0.5em} % Pulls the items closer
|
||||
\item Nesting
|
||||
\item Is
|
||||
\item Nice
|
||||
\end{enumerate}
|
||||
\begin{itemize}
|
||||
\item You can
|
||||
\item[\LaTeX] Even
|
||||
\item[*] Do
|
||||
\item[$\rightarrow$] This
|
||||
\end{itemize}
|
||||
\end{enumerate}
|
||||
Reference in New Issue
Block a user