-
Notifications
You must be signed in to change notification settings - Fork 1
/
cheetsheet_working_copy.tex
235 lines (180 loc) · 6.73 KB
/
cheetsheet_working_copy.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
\documentclass{article}
\usepackage[a4paper, hmargin={2.8cm, 2.8cm}, vmargin={2.5cm, 2.5cm}]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{csvsimple}
\usepackage{subcaption}
\usepackage{url}
\usepackage{tikz}
\usepackage{pgfplots}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{parskip}
\usepackage{listings}
\usepackage{enumitem}
\usepackage{titlesec}
\usepackage[lastpage,user]{zref}
\usepackage{caption}
\usepackage{scrextend}
% \usepackage[outputdir=./.latex-out]{minted} % TODO slet hvis du ikke bruger minted
\usepackage{listings}
\usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\python}[1] {
\mintinline{python}{#1}
}
\newcommand{\tex}[1] {
\mintinline{latex}{#1}
}
\pagestyle{fancy}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\lhead{\LaTeX webinar} % TODO indsæt venstre sidehoved
\rhead{Study Now} % TODO indsæt højre sidehoved
\cfoot{\thepage\ of \zpageref{LastPage}}
\newtheorem*{prp}{Propostion}
\setlist{nolistsep}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{
\vspace{13em}
\large{Study Now} \\
\Large{\LaTeX webinar} \\
}
\author{
Benjamin Rotendahl --- Benjamin@Rotendahl.dk
}
\date{
\vspace{22em}
\today
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\maketitle
\newpage
\tableofcontents
\newpage
\section{Introduktion til \LaTeX}
This document is as a \emph{cheat sheet}. It covers how to setup a \LaTeX{}
document and showcases the most common \LaTeX{} commands and functions.
You have both the pdf and source code such that you can add other cool commands
you find on your journey. Vil du se en sej figur, så kig i section~\ref{sec:latex_to_pdf}
We have that a partial derivative is given by
\begin{flalign}
\frac{\partial f}{\partial x} & = 4x + 4y \\
\frac{\partial f}{\partial y} & = 6y + 4x
\end{flalign}
\section{Introduction}
\section{\LaTeX{} background}
Before diving into the syntax of \LaTeX{} you should know a bit about the
process of writing \LaTeX{} documents. \LaTeX{} is a typesetting program and
language. The main advantage of \LaTeX{} is its ability to typeset math, code
and other scientific/technical figures. \LaTeX{} in an extension of TeX, which
released by Donald Knuth in the year 1981.
\subsection{From source code to PDF}\label{sec:local}
\LaTeX{} is not a word processor, but a language and compiler which given a
file containing source code, written in an \emph{editor}, creates a PDF.
as mentiond in section~\ref{sec:local}
An editor for local use, could be \emph{Visual studio code}\cite{vscode}, it
can be used to write any programming/markup language. Support for languages
comes through packages that extends its functionality, there exists packages
for most languages such as python, javascript and \LaTeX{}\cite{latexPackage}.
After the editor has saved the source code, it must be passed to the compiler.
This can be setup to happen automatically on save. There are different versions
of the compiler, they differ in the amount of packages and features they come
with. ``The latex project TeX''\cite{texLive} has links to various distributions
for the most common operating systems.
With an editor and compiler installed you are ready to write \LaTeX{}.
The processes is illustrated in figure~\ref{fig:compile}.
\subsection{Fra kildekode til PDF}\label{sec:latex_to_pdf}
\section{Matematik i \LaTeX}
After the editor has saved the source code, it must be passed to the compiler.
This can be setup to happen automatically on save. There are different versions
of the compiler, they differ in the amount of packages and features they come
with. ``The latex project TeX''\cite{texLive} has links to various distributions
for the most common operating systems.
With an editor and compiler installed you are ready to write \LaTeX{}.
Der er mange cirkelkonstanter den bedste er \(\pi = 2 \cdot \tau\) de er seje
givet et vilkårligt \(x\) som er mindre end \(x < n\) så kanm vi.
\[
\pi = \frac{1}{2} \tau
\]
\begin{quote}
Tau er altså bedre end pi sagde min forlæser se bare på ligning~\ref{eq:tau}
\end{quote}
\begin{equation}\label{eq:tau}
\pi = \frac{1}{2} \tau
\end{equation}
\begin{equation*}
2\pi = \tau
\end{equation*}
hej med jer!
\begin{flalign*}
f(x,y) & = 2x^2 + 3y^2 + 4xy \\
\frac{\partial f}{\partial x} & = 4x + 4y \\
\frac{\partial f}{\partial y} & = 6y + 4x
\end{flalign*}
Der er mange cirkelkonstanter den bedste er \(\pi = 2 \cdot \tau\) de er seje
givet et vilkårligt \(x\) som er mindre end \(x < n\) så kanm vi.
Det er en normalfordeling givet ved
\[
f(x_{1}, x_2, \dots, x_n) = \int_{i=0}^{n} x_i \,dx
\]
\subsection{Figure}
Vi skal have noget grafik!
\begin{figure}
\centering
\includegraphics[width=0.8\linewidth]{assets/compile.png}
\caption{The process of compiling \LaTeX{} source code to PDF}
\label{fig:compile}
\end{figure}
Der er mange cirkelkonstanteor den bedste er \(\pi = 2 \cdot \tau\) de er seje
givet et vilkårligt \(x\) som er mindre end \(x < n\) så kanm vio.
as shown in\cite{latexPackage}
\newpage
\appendix
\bibliography{assets/references}{}
\bibliographystyle{plain}
\begin{table}
\centering
\begin{tabular}{l | c | c }
Navn & Studie & Semester \\ \hline
Benjamin & Datalogi & 3 \\ \hline
Mads & Historie & 5 \\ \hline
Ida & Biologi & 6 \\ \hline
\end{tabular}
\caption{En tabel med studerende}
\label{tab:studerende}
\end{table}
En auto tabel:
\begin{table}
\centering
\csvautotabular{assets/dices.csv}
\caption{En auto tabel}
\label{tab:studerende}
\end{table}
\newpage
\appendix
\bibliography{../assets/references}{}
\bibliographystyle{plain}
\newpage
\subsection{\LaTeX{} tankegang \& syntax}
\subsubsection{Kommando syntax}
\subsection{Referencemateriale og problemløsning}
\subsection{Matematikoperationer og notationer}
\subsection{Matricer og vektorer}
\section{Figurerer}
\section{Lister}
\section{Tabeller}
\section{Kodetekst}
\section{Referencer}
\end{document}