738096d77c4fd83b49f171a60535605b4c15a690
[linuxnijmegen-latex.git] / lat.tex
1 %&lat
2 \begin{document}
3 \frame{\titlepage}
4
5 \section{Introductie}
6 \begin{frame}
7 \frametitle{Wat is \LaTeX}
8 \begin{itemize}[<+->]
9 \item Donald Knuth
10 \item TeX
11 \item Komt van het woord \texttau\textepsilon\textchi\textnu\texteta
12 \item Dus spreek uit als latech
13 \item \texttt{texlive}, \texttt{miktex}, \texttt{tetex}
14 \item \texttt{tex}, \texttt{pdflatex},\texttt{latex},
15 \texttt{pdftex}, \texttt{xelatex}, \texttt{xetex}
16 \item \url{sharelatex.com}
17 \end{itemize}
18 \end{frame}
19
20 \section{Document structuur}
21 \subsection{Titelpagina en inhoudsopgave}
22 \begin{frame}[fragile]
23 \frametitle{Broncode structuur}
24 \begin{lstlisting}
25 \documentclass[opt1,...,optn]{type}
26 ...
27 preamble
28 ...
29 \begin{document}
30 % Dit is een comment
31 ...
32 document
33 ...
34 \end{document}
35 \end{lstlisting}
36 \end{frame}
37
38 \begin{frame}
39 \frametitle{Een greep uit de opties en typen}
40 \begin{block}{Opties}
41 \begin{itemize}
42 \item\texttt{a4paper}
43 \item\texttt{twocolumn}
44 \item\texttt{twoside}
45 \item\texttt{10pt}
46 \item\texttt{12pt}
47 \item\ldots
48 \end{itemize}
49 \end{block}
50
51 \begin{block}{documenttypes}
52 \begin{itemize}
53 \item\texttt{article}
54 \item\texttt{book}
55 \item\texttt{letter}
56 \item\ldots
57 \end{itemize}
58 \end{block}
59 \end{frame}
60
61 \begin{frame}[fragile]
62 \frametitle{Type commandos}
63 \begin{lstlisting}
64 \begin{commando}[opties]
65 % Dit is allemaal onder invloed van commando
66 \end{commando}
67
68 \commando[opties]{
69 % Dit is allemaal onder invloed van commando
70 }
71
72 {\commando
73 % Dit is meestal het geval bij text decoraties
74 }
75 \end{lstlisting}
76 \end{frame}
77
78 \begin{frame}[fragile]
79 \frametitle{Inhoudsopgave en titelpagina}
80 \framesubtitle{preamble en document}
81 \begin{block}{Document info en titelpagina}
82 \begin{lstlisting}[caption=preamble]
83 \author{Mart Lubbers}
84 \title{Mooie titel}
85 \date{\today}
86 \end{lstlisting}
87
88 \begin{lstlisting}[caption=document]
89 \maketitle
90 \end{lstlisting}
91 \end{block}
92
93 \begin{block}{Inhoudsopgave}
94 Automatisch gegenereerd van de hoofdstukken.
95 \begin{lstlisting}
96 \tableofcontents
97 \end{lstlisting}
98 \end{block}
99 \end{frame}
100
101 \subsection{Secties, subsecties en paragrafen}
102 \begin{frame}
103 \frametitle{Secties}
104 \framesubtitle{document}
105 \begin{block}{Types}
106 \begin{tabular}{lll}
107 Commando & Diepte & Notitie\\
108 \texttt{\textbackslash part\{naam\}} & $-1$ &\\
109 \texttt{\textbackslash chapter\{naam\}} & $0$ &
110 niet in article\\
111 \texttt{\textbackslash section\{naam\}} & $1$ &\\
112 \texttt{\textbackslash subsection\{naam\}} & $2$ &\\
113 \texttt{\textbackslash subsubsection\{naam\}} & $3$ &\\
114 \texttt{\textbackslash paragraph\{naam\}} & $4$ &
115 niet in de inhoudsopgave\\
116 \texttt{\textbackslash subparagraph\{naam\}} & $5$ &
117 niet in de inhoudsopgave\\
118 \end{tabular}
119 \end{block}
120
121 \begin{block}{Aparte inhoudsopgave text}
122 \begin{itemize}
123 \item \texttt{\textbackslash commando[inhoudsopgave]\{naam\}}
124 \item Automatische nummering
125 \end{itemize}
126 \end{block}
127 \end{frame}
128
129 \subsection{Decoratie, symbolen en tekstgrootte}
130 \begin{frame}
131 \frametitle{Decoratie}
132 \framesubtitle{document}
133
134 \begin{block}{Diverse types}
135 \begin{tabular}{ll}
136 \texttt{\textbackslash emph\{emphasis\}} & \emph{emphasis}\\
137 \texttt{\textbackslash textit\{italic\}} & \textit{italic}\\
138 \texttt{\textbackslash textbf\{bold\}} & \textbf{bold}\\
139 \texttt{\textbackslash textsl\{slanted\}} & \textsl{slanted}\\
140 \texttt{\textbackslash texttt\{monospace\}} & \texttt{monospace}\\
141 \texttt{\textbackslash textsc\{smallcaps\}} & \textsc{smallcaps}\\
142 \end{tabular}
143 \end{block}
144
145 \begin{block}{Met pakketten nog veel meer mogelijk}
146 \begin{itemize}
147 \item strikethrough
148 \item underline
149 \item calligrafie
150 \item \ldots
151 \end{itemize}
152 \end{block}
153 \end{frame}
154
155 \begin{frame}
156 \frametitle{Textgrootte}
157 \framesubtitle{document}
158 \begin{block}{Filosofie}
159 \begin{itemize}
160 \item \LaTeX{ }bepaalt, referentietabel aanwezig
161 \item absolute grootte alleen mogelijk met pakketten
162 \end{itemize}
163 \end{block}
164
165 \begin{block}{Textgrootte}
166 \begin{tabular}{ll}
167 \texttt{\{\textbackslash tiny miniscuul\}} &
168 \tiny{miniscuul}\\
169 \texttt{\{\textbackslash scriptsize bijzonder klein\}} &
170 \scriptsize{bijzonder klein}\\
171 \texttt{\{\textbackslash footnotesize erg klein\}} &
172 \footnotesize{erg klein}\\
173 \texttt{\{\textbackslash small klein\}} &
174 \small{klein}\\
175 \texttt{\{\textbackslash normalsize normaal\}} &
176 \normalsize{normaal}\\
177 \texttt{\{\textbackslash large aan de forse kant\}} &
178 \large{aan de forse kant}\\
179 \texttt{\{\textbackslash Large groot\}} &
180 \Large{groot}\\
181 \texttt{\{\textbackslash LARGE erg groot\}} &
182 \LARGE{erg groot}\\
183 \texttt{\{\textbackslash huge bijzonder groot\}} &
184 \huge{bijzonder groot}\\
185 \texttt{\{\textbackslash Huge gigantisch\}} &
186 \Huge{gigantisch}
187 \end{tabular}
188 \end{block}
189 \end{frame}
190
191 \begin{frame}
192 \frametitle{Symbolen}
193 \framesubtitle{document}
194 \begin{block}{Symbolen}
195 \begin{itemize}
196 \item \texttt{\textbackslash usepackage[utf-8]\{inputenc\}}
197 \item \url{detexify.kirelabs.org}
198 \item Diakritische tekens staan er niet op
199 \item Veel cheatsheets beschikbaar
200 \end{itemize}
201 \end{block}
202
203 \begin{block}{Diakritische tekens}
204 \begin{tabular}{llp{30pt}ll}
205 \texttt{\textbackslash \'{}o} & \'o &
206 \texttt{\textbackslash H\{o\}} & \H{o}\\
207 \texttt{\textbackslash \"{}o} & \"o &
208 \texttt{\textbackslash c\{o\}} & \c{o}\\
209 \texttt{\textbackslash \`{}o} & \`o &
210 \texttt{\textbackslash b\{o\}} & \b{o}\\
211 \texttt{\textbackslash\textasciicircum o} & \^o &
212 \texttt{\textbackslash u\{o\}} & \u{o}\\
213 \texttt{\textbackslash\textasciitilde o} & \^o &
214 \texttt{\textbackslash r\{o\}} & \r{o}\\
215 \texttt{\textbackslash .o} & \.o &
216 \texttt{\textbackslash v\{o\}} & \v{o}\\
217 \texttt{\textbackslash l} & \l &
218 \texttt{\textbackslash =o} & \=o\\
219 \texttt{\textbackslash o} & \o\\
220 \end{tabular}
221 \end{block}
222 \end{frame}
223
224 \subsection{Lijsten en opsommingen}
225 \begin{frame}
226 \frametitle{Lijsten en opsommingen}
227 \framesubtitle{document}
228 \begin{block}{}
229 \begin{itemize}
230 \item Je kan lijsten maken van lijsten
231 \item Je kan met pakketten alles naar je hand zetten
232 \item Met \texttt{\textbackslash item} maak je items
233 \end{itemize}
234 \end{block}
235
236 \begin{block}{itemize}
237 \begin{itemize}
238 \item Ongenummerde lijsten maken
239 \end{itemize}
240 \end{block}
241
242 \begin{block}{enumerate}
243 \begin{itemize}
244 \item Genummerde lijsten maken
245 \end{itemize}
246 \end{block}
247 \end{frame}
248
249 \begin{frame}[fragile]
250 \frametitle{Voorbeeld deel 1}
251 \begin{lstlisting}
252 \begin{itemize}
253 \item \begin{enumerate}
254 \item hallo
255 \item wereld
256 \item \begin{enumerate}
257 \item hoi1
258 \item hoi2
259 \end{enumerate}
260 \end{enumerate}
261 \item \LaTeX
262 \end{itemize}
263 \end{lstlisting}
264 \end{frame}
265
266 \begin{frame}
267 \frametitle{Voorbeeld deel 2}
268 \begin{block}{Uitkomst}
269 \begin{itemize}
270 \item \begin{enumerate}
271 \item hallo
272 \item wereld
273 \item \begin{enumerate}
274 \item hoi1
275 \item hoi2
276 \end{enumerate}
277 \end{enumerate}
278 \item \LaTeX
279 \end{itemize}
280 \end{block}
281
282 \begin{block}{Caveat}
283 Uitvoer documentafhankelijk
284 \end{block}
285 \end{frame}
286
287 \subsection{Formules en tabellen}
288 \begin{frame}
289 \frametitle{Formules}
290 \framesubtitle{document}
291 \begin{itemize}
292 \item \$,\$ of \$\$,\$\$
293 \item \textbackslash$[$,\textbackslash$]$
294 \item \texttt{\textbackslash everymath\{\textbackslash displaystyle\}}
295 \item \texttt{equation}
296 \item \texttt{equation*}
297 \end{itemize}
298 \end{frame}
299
300 \begin{frame}[fragile]
301 \begin{block}{Breuken}
302 \begin{lstlisting}
303 \frac{n!}{k!(n-k)!}=\binom{n}{k}
304 \end{lstlisting}
305 $$\frac{n!}{k!(n-k)!}=\binom{n}{k}$$
306 \end{block}
307 \begin{block}{Som, product, index}
308 \begin{lstlisting}
309 \int^\infty_0\sum^{\mathbb{N}}_{i=5}\prod^{3}_{j=0}k_{i,j}^2
310 \end{lstlisting}
311 $$\int^\infty_0\sum^{\mathbb{N}}_{i=5}\prod^{3}_{j=0}k_{i,j}^2$$
312 \end{block}
313 \begin{block}{Logica}
314 \begin{lstlisting}
315 \forall\psi\in\mathbb{B}:\exists\phi\in\Psi:\psi\vee\phi
316 \end{lstlisting}
317 $$\forall\psi\in\mathbb{B}:\exists\phi\in\Psi:\psi\vee\phi$$
318 \end{block}
319 \end{frame}
320
321 \begin{frame}[fragile]
322 \begin{block}{Haakjes}
323 \begin{lstlisting}
324 (a),[b],\{c\},|d|,\|e\|,\langlef\rangle,\lfloorg\rfloor,
325 \lceilh\rceil,\ulcorneri\urcorner
326 \end{lstlisting}
327 $$(a),[b],\{c\},|d|,\|e\|,\langle f\rangle,\lfloor g\rfloor,
328 \lceil h\rceil,\ulcorner i\urcorner$$
329 I.c.m. \texttt{\textbackslash left/right} goede grootte.
330 \end{block}
331
332 \begin{block}{Handige pakketten}
333 \begin{itemize}
334 \item \texttt{amsmath,amssymb}
335 \begin{itemize}
336 \item \texttt{align}
337 \item \texttt{text}
338 \item extra symbolen
339 \end{itemize}
340 \item \texttt{nicefrac}
341 \end{itemize}
342 \end{block}
343 \end{frame}
344
345 \section{Uitbreidingspakketten}
346 \subsection{Plaatjes}
347 \begin{frame}[fragile]
348 \frametitle{Plaatjes invoegen}
349 \framesubtitle{preamble,document}
350 \begin{lstlisting}[caption=preamble]
351 \usepackage{graphicx}
352 \end{lstlisting}
353 \begin{lstlisting}[caption=document]
354 \includegraphics[width=80px]{tux.png}
355 \end{lstlisting}
356 \includegraphics[width=80px]{tux.png}
357 \end{frame}
358
359 \begin{frame}[fragile]
360 \frametitle{Figuren}
361 \framesubtitle{document}
362 \begin{lstlisting}
363 \begin{figure}[h]
364 \centering
365 \includegraphics[width=80px]{tux.png}
366 \caption{Dit is tux}
367 \end{figure}
368 \end{lstlisting}
369 \begin{figure}[h]
370 \centering
371 \includegraphics[width=80px]{tux.png}
372 \caption{Dit is tux}
373 \end{figure}
374 \end{frame}
375
376 \subsection{Broncode}
377 \begin{frame}[fragile]
378 \frametitle{Broncode}
379 \framesubtitle{preamble,document}
380 \begin{lstlisting}
381 \usepackage{listings}
382 \end{lstlisting}
383 \lstinputlisting[caption=document]{broncode.tex}
384 \lstinputlisting[language=c,caption=uitvoer]{broncode.c}
385 \end{frame}
386
387 \begin{frame}
388 \frametitle{Nog meer broncode}
389 \begin{itemize}
390 \item\texttt{\textbackslash lstinputlisting}
391 \item\texttt{\textbackslash lstset}
392 \item\texttt{breaklines}
393 \item\texttt{numbers=left}
394 \item\texttt{frame=L}
395 \item\texttt{minted}
396 \item\ldots
397 \end{itemize}
398 \end{frame}
399
400 \subsection{Algorithmen}
401 \begin{frame}[fragile]
402 \frametitle{Algorithmen}
403 \framesubtitle{preamble,document}
404 \begin{lstlisting}
405 \usepackage{algorithm2e}
406 \end{lstlisting}
407 \begin{lstlisting}
408 \begin{algorithm}[H]
409 \SetKwProg{Def}{def}{:}{end}
410 \Def{replace\_or\_register\_dawg(state)}{
411 child := last\_child(state)\;
412 \If{has\_children(child)}{
413 replace\_or\_register(child)\;
414 }
415 \eIf{\exists q': q\equiv q'}{
416 last\_child(state)\;
417 delete(child)\;
418 }{
419 register.add(child)\;
420 }
421 }
422 \end{algorithm}
423 \end{lstlisting}
424 \end{frame}
425
426 \begin{frame}
427 \frametitle{Algorithmen deel twee}
428 \begin{algorithm}[H]
429 \SetKwProg{Def}{def}{:}{end}
430 \Def{replace\_or\_register\_dawg(state)}{%
431 child := last\_child(state)\;
432 \If{has\_children(child)}{%
433 replace\_or\_register(child)\;
434 }
435 \eIf{$\exists q': q\equiv q'$}{%
436 last\_child(state)\;
437 delete(child)\;
438 }{%
439 register.add(child)\;
440 }
441 }
442 \end{algorithm}
443 \end{frame}
444
445 \subsection{En nog veel meer\ldots}
446 \begin{frame}
447 \frametitle{En nog veel meer\ldots}
448 \begin{itemize}[<+->]
449 \item Presentaties: \texttt{beamer}
450 \item Bibliografie\"en: \texttt{bibtex}
451 \item Diagrammen: \texttt{tikz,xypic}
452 \item Tabellen: \texttt{tabular,booktabs,tabu,tabux}
453 \item Chemie: \texttt{chemfig}
454 \item Linguistiek: \texttt{tipa}, \texttt{babel}
455 \item Facturen: \texttt{invoice}
456 \item Gedichten: \texttt{verse}
457 \item Sudoki:
458 \url{ctan.org/pkg/sudokubundle}
459 \item Reversii:
460 \url{tex.stackexchange.com/a/104312}
461 \item Torens van Hanoi:
462 \url{texample.net/tikz/examples/towers-of-hanoi/}
463 \item BASIC interpreter:
464 \url{tug.org/TUGboat/tb11-3/tb29greene.pdf}
465 \item 8bit microcontroller:
466 \url{ctan.org/pkg/avremu}
467 \item \ldots
468 \item Alles dus
469 \end{itemize}
470 \end{frame}
471
472 \end{document}