-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathpart2.tex
58 lines (50 loc) · 3.94 KB
/
part2.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
\newcommand{\texMacro}[2]{\texttt{\textbackslash{#1}\{#2\}}}
\section{General LaTeX tips}\label{sec:latex_tips}
Some tips were given in \Cref{sec:intro}, and this section will elaborate with some more concrete examples.
\subsection{Matrix Equations}
Here is a matrix equation you can use as a template:
\begin{equation}
\begin{bmatrix}
1 & 0 & 0 & 0 & -b & 0 & 0 & 0 \\
-a & 1 & 0 & 0 & 0 & -b & 0 & 0 \\
0 & -a & 1 & 0 & 0 & 0 & -b & 0 \\
0 & 0 & -a & 1 & 0 & 0 & 0 & -b
\end{bmatrix}
\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \\ u_0 \\ u_1 \\ u_2 \\ u_3 \end{bmatrix}
=
\begin{bmatrix}
ax_0 \\ 0 \\ 0 \\ 0
\end{bmatrix}
\end{equation}
\subsection{Tables}
If you want, you can use the source for \Cref{tab:parameters} to see how a (floating) table is made.
Variables and symbols are always in italics, while units are not.
\begin{table}[tbp]
\centering
\caption{Parameters and values.}
\begin{tabular}{llll}
\toprule
Symbol & Parameter & Value & Unit \\
\midrule
$l_a$ & Distance from elevation axis to helicopter body & $0.63$ & \meter \\
$l_h$ & Distance from pitch axis to motor & $0.18$ & \meter \\
$K_f$ & Force constant motor & $0.25$ & \newton\per\volt \\
$J_e$ & Moment of inertia for elevation & $0.83$ & \kilogram\usk\meter\squared \\
$J_t$ & Moment of inertia for travel & $0.83$ & \kilogram\usk\meter\squared \\
$J_p$ & Moment of inertia for pitch & $0.034$ & \kilogram\usk\meter\squared \\
$m_h$ & Mass of helicopter & $1.05$ & \kilogram \\
$m_w$ & Balance weight & $1.87$ & \kilogram \\
$m_g$ & Effective mass of the helicopter & $0.05$ & \kilogram \\
$K_p$ & Force to lift the helicopter from the ground & $0.49$ & \newton \\
\bottomrule
\end{tabular}
\label{tab:parameters}
\end{table}
\subsection{The \texMacro{input}{} command}
By using \texMacro{input}{whatever} in your main tex file (\texttt{labreport.tex} in this case), the content of \texttt{whatever.tex} will be included in your pdf. This way you can split the contents into different files, e.g.~one for each problem of the assignment. This makes it easier to restructure the document, and arguably improves the readability of the tex files. For instance; maybe you want each problem to start on a new page? Simply add \textbackslash{newpage} before each \texMacro{input}{} command. Alternatively, you can use the \texMacro{include}{} command to achieve more or less the same effect. See~\cite{InputVsInclude} for more information.
\subsection{Citations and Reference Management}
In academic writing, it is very important to cite your sources. In Latex this is done by defining an an entry in a \emph{BibTeX} bibliography file like this (from \texttt{bibliography.bib}):
\lstinputlisting[language=Tex, firstline=1, lastline=7]{bibliography.bib}
and then using the \texttt{\textbackslash{cite}} command in your Latex document. For instance \texttt{\textbackslash{cite}\{Chen2014\}} will produce~\cite{Chen2014}.
There are many different citation styles, and a lot of customization that is possible, so please check out e.g.~\cite{BiberBibtexEtc,WikibookLatex}\footnote{Keep citation of web pages to a minimum, and consider using \url{http://web.archive.org} if you are worried that the reference may change or be removed in the future.}.
There is also a lot of useful software to manage your references. Some popular examples include JabRef (\url{http://www.jabref.org/}), Mendeley (\url{https://www.mendeley.com/}) and EndNote. JabRef is perhaps the simplest of these three, and stores all information in a \texttt{.bib} file that you can directly use in your Latex document. Both Mendeley and EndNote can export references as BibTeX.