latex.tex 21.7 KB
Newer Older
Stefan Heimersheim's avatar
Stefan Heimersheim committed
1
\documentclass[xcolor=dvipsnames]{beamer}
2
3
4
5
6
7
8
9

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage{verbatim}
\usepackage{dtk-logos}
\usepackage{hyperref}
10
\usepackage{tikz}
Valentin Bruch's avatar
Valentin Bruch committed
11
\usetikzlibrary{backgrounds, fit, matrix, calc}
12
13
\usepackage{listings}
\usepackage{calc}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
14
\graphicspath{{figures/}{examples/}}
Lennart Klebl's avatar
Lennart Klebl committed
15
\usefonttheme{professionalfonts}
16

Lennart Klebl's avatar
Lennart Klebl committed
17
18
\setmonofont{FiraCode}

19
20
\usetheme{OSAK}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
21
\lstset{
Lennart Klebl's avatar
Lennart Klebl committed
22
23
24
25
26
  basicstyle=\scriptsize\ttfamily,
  language={[LaTeX]TeX},
  texcsstyle=*\color{Mahogany}\bfseries,
  commentstyle=\itshape\color{RoyalBlue},
  keywordstyle=\color{RoyalBlue}\bfseries,
Lennart Klebl's avatar
Lennart Klebl committed
27
28
  moretexcs={lstset,subsubsection,paragraph,subsection,color,sl,textcolor,lstinputlisting,newfontfamily,fontsize,section,documentclass,begin,includegraphics,hello,bye,setmainlanguage,setlength},
  morekeywords={center,document,flushleft,flushright,itemize,enumerate,tabular,article,polyglossia,geometry,amsmath,graphicx,xcolor,hyperref}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
29
30
}

31
32
33
34
\makeatletter
\newcommand\notsotiny{\@setfontsize\notsotiny{7}{8}}
\makeatother

35
36
37
38
39
40
41
42
43
44
45
% TODO Titel & Autoren anpassen!
\date{\today}
\title[\LaTeX-Workshop]{\LaTeX ist toll!}
\subtitle{wirklich!}
\author{OSAK-Mitglied \#42}
\institute[OSAK]{
  Open Source Arbeitskreis der \\
  Fachschaft Mathematik/Physik/Informatik an der RWTH Aachen \\
  und der Aachener Linux User Group
}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
46
\newlength\marginwidth
Valentin Bruch's avatar
Valentin Bruch committed
47
\newcommand\marginbox[3][2pt]{
Valentin Bruch's avatar
Valentin Bruch committed
48
49
50
  % USAGE: \marginbox[margin width]{width}{content}
  % TODO: width is set manually such that it fits real width!
  \setlength\marginwidth{#1}
Valentin Bruch's avatar
Valentin Bruch committed
51
52
  \begin{tikzpicture}[even odd rule, scale=1]
    \node[anchor=north west] (text) {%
Valentin Bruch's avatar
Valentin Bruch committed
53
54
      \begin{minipage}{#2-2\marginwidth-10pt}%
        #3%
Valentin Bruch's avatar
Valentin Bruch committed
55
56
57
58
59
60
61
62
      \end{minipage}%
    };
    \begin{pgfonlayer}{background}
      \node[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)] {};
    \end{pgfonlayer}
  \end{tikzpicture}
}

63
64
65
66
67
68
69
70
71
72
73
\begin{document}

\begin{frame}{OSAK \LaTeX-Workshop}{Installation einer \TeX-Distribution}
  % TODO
  \Huge QR-CODE UND/ODER URL
\end{frame}

\begin{frame}
  \titlepage
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
74
75
% TODO Blocksatz ist Standard!

76
77
78
79
80
81
82
\begin{frame}{Inhaltsverzeichnis}
  \tableofcontents
\end{frame}

\section{Motivation}
\section{Dokumente mit \LaTeX}
\subsection{\TeX{}studio als Editor}
83
84
85
86
87
\subsection{Aufbau eines \LaTeX-Dokuments}
\OSAKthemenologo
\begin{frame}{Aufbau eines \LaTeX-Dokuments}
  \begin{columns}[T]
    \begin{column}{.35\textwidth}
Valentin Bruch's avatar
Valentin Bruch committed
88
      {\LaTeX} übersetzt\\
89
90
91
      Text in ein PDF
      \begin{itemize}
        \item Automatische Formatierung
Stefan Heimersheim's avatar
Stefan Heimersheim committed
92
93
        \item Weitere Formatierung durch\\Befehle im Text
        \item Für (fast) alles gibt es Befehle
Lennart Klebl's avatar
Lennart Klebl committed
94
    \setlength\itemsep{\fill} %wieso geht das nicht?
95
96
97
98
99
100
101
102
103
104
105
106
      \end{itemize}
    \end{column}
    \begin{column}{.63\textwidth}
      \vspace*{-4pt}%
      \centering%
      \begin{tikzpicture}[even odd rule, scale=1]
        \coordinate (text) at (0,0);
        \filldraw[fill=blue!25!lightgray, draw=blue!25!lightgray]
        (0,0) rectangle (\textwidth, -.5\textwidth)
        (2pt,-15pt) rectangle (\textwidth-2pt, -.5\textwidth+2pt);
        \node[anchor=north west] at (0pt, 0pt) {Editor: HelloWorld.tex};
        \node[anchor=north west] at (4pt, -12pt) {\parbox[t][.5\textwidth-27pt][t]{\textwidth-12pt}{%
107
            \lstinputlisting[basicstyle=\small\ttfamily]{examples/minimal.tex}
108
109
110
111
112
113
114
115
116
117
        }};
      \end{tikzpicture}\\[-11pt]
      \includegraphics[angle=-90, width=.1\textwidth]{figures/texstudio-compile.pdf}\\[2pt]
      \begin{tikzpicture}[even odd rule, scale=1]
        \coordinate (text) at (0,0);
        \filldraw[fill=blue!25!lightgray, draw=blue!25!lightgray]
        (0,0) rectangle (\textwidth, -.4\textwidth)
        (2pt,-15pt) rectangle (\textwidth-2pt, -.4\textwidth+2pt);
        \node[anchor=north west] at (0pt, 0pt) {PDF viewer: HelloWorld.pdf};
        \node[anchor=north west] at (2pt, -15pt) {\parbox[t][.4\textwidth-27pt][c]{\textwidth-12pt}{%
Lennart Klebl's avatar
Lennart Klebl committed
118
          \hspace{.1\textwidth}$\mathrm{Hallo\ Welt!}$
119
120
121
122
123
124
        }};
      \end{tikzpicture}
    \end{column}
  \end{columns}
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
125
126
% Logo einblenden
\OSAKthemelogo
127
128
129
\subsection{Beispieldokument}
\section{Präsentationen mit \LaTeX-Beamer}
\subsection{?}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
130
% Logo ausblenden
131
\OSAKthemenologo
Stefan Heimersheim's avatar
Stefan Heimersheim committed
132
%todo beispiel 1 fehlt!
133
134
\begin{frame}[fragile]{Das Prinzip}
\structure{Ihr schreibt eine \texttt{.tex} Datei:}
135
\begin{itemize}
136
137
138
139
  \item Normaler Text hier wird später im PDF landen
  \item Befehle, z.\,B. \texttt{\textbackslash textbf\{\}}, haben Effekte (z.\,B. \textbf{fett})
  \item Kommentare (mit \%) werden ignoriert
  \item Editor: Screenshot
140
141
142
\end{itemize}
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
143

Stefan Heimersheim's avatar
Stefan Heimersheim committed
144
145
\begin{frame}[fragile]{Umbrüche}
  \structure{Zeilen:}
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
  \begin{tikzpicture}
      \node[matrix, column sep=4pt, row sep=6pt] {
        \node{
          \begin{minipage}[t][10mm][c]{.28\textwidth}
            \begin{itemize}
                \item Zeilen im \texttt{.tex} ignoriert
            \end{itemize}
          \end{minipage}
        }; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.3\textwidth}
            \lstinputlisting{examples/2a_umbruch.tex}
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.25\textwidth}
            \input{examples/2a_umbruch.tex}
          \end{minipage}
        };
        \\
        \node{
          \begin{minipage}[t][10mm][c]{.28\textwidth}
            \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
170
                \item Leere Zeile\\$\implies$ Absatz
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
            \end{itemize}
          \end{minipage}
        }; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.3\textwidth}
            \lstinputlisting{examples/2b_umbruch.tex}
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.25\textwidth}
            \input{examples/2b_umbruch.tex}
          \end{minipage}
        };
        \\
        \node{
          \begin{minipage}[t][10mm][c]{.28\textwidth}
            \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
189
                \item Zeilenumbruch manuell: \texttt{\textbackslash\textbackslash}
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
            \end{itemize}
          \end{minipage}
        }; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.3\textwidth}
            \lstinputlisting{examples/2c_umbruch.tex}
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.25\textwidth}
            \input{examples/2c_umbruch.tex}
          \end{minipage}
        };
        \\
      };
    \end{tikzpicture}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
207
  \structure{Seiten:}
208
209
210
211
212
  \begin{tikzpicture}
      \node[matrix, column sep=4pt, row sep=6pt] {
        \node{
          \begin{minipage}[t][10mm][c]{.28\textwidth}
            \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
213
                \item Manuell neue Seite:
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
            \end{itemize}
          \end{minipage}
        }; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.3\textwidth}
            \lstinputlisting{examples/2d_umbruch.tex}
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.25\textwidth}
            Foto
          \end{minipage}
        };
        \\
      };
    \end{tikzpicture}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
231

232
233
\end{frame}

234

Stefan Heimersheim's avatar
Stefan Heimersheim committed
235
\begin{frame}[fragile]{Formatierung}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
236
\structure{Schrifteinstellungen:}
237
238
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
Lennart Klebl's avatar
Lennart Klebl committed
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
    \begin{itemize}
    \item Fontstyle
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][10mm][c]{.3\textwidth}
    \lstinputlisting{examples/2e.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][10mm][c]{.25\textwidth}
      \textbf{fett} \textit{kursiv}\\
      \underline{unterstrichen}
    \end{minipage}
  };
  \\
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
    \begin{itemize}
    \item Schriftgröße
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][20mm][c]{.3\textwidth}
    \lstinputlisting{examples/2f.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][20mm][c]{.25\textwidth}
      \tiny tiny
      \small small
      \large large\\
Stefan Heimersheim's avatar
Stefan Heimersheim committed
277
278
      \Large Large\,\LARGE LARGE\\
      ...
Lennart Klebl's avatar
Lennart Klebl committed
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
    \end{minipage}
  };
  \\
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
    \begin{itemize}
    \item Textfarbe
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][10mm][c]{.3\textwidth}
    \lstinputlisting[basicstyle=\notsotiny\ttfamily]{examples/2g.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][10mm][c]{.25\textwidth}
    \input{examples/2g.tex}
    \end{minipage}
  };
  \\
Stefan Heimersheim's avatar
Stefan Heimersheim committed
301
302
303
304
};
\end{tikzpicture}
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
305
\begin{frame}[fragile]{Abschnitte}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
306
\begin{columns}
Lennart Klebl's avatar
Lennart Klebl committed
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
  \begin{column}{0.4\textwidth}
    \structure{section, subsection, subsubsection:}
    \begin{itemize}
      \item Überschriften (automatisch numeriert)
      \begin{tikzpicture}
      \node[draw=blue!20!lightgray, line width=2pt]{
        \begin{minipage}[t][22mm][c]{0.7\textwidth}
        \lstinputlisting[basicstyle=\notsotiny\ttfamily]{examples/2h.tex}
        \end{minipage}
      };
      \end{tikzpicture}
      \item Inhaltsverzeichnis (automatisch erstellt)
      \texttt{\textbackslash tableofcontents}
    \end{itemize}
  \end{column}
  \begin{column}{0.5\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
323
      \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/2h_fake.pdf}
Lennart Klebl's avatar
Lennart Klebl committed
324
  \end{column}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
325
\end{columns}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
326
327
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
328
329
\begin{frame}[fragile]{Umgebungen}
\begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
330
331
  \setbeamertemplate{itemize items}[square]
  \item Umgebungen durch \texttt{begin} und \texttt{end} begrenzt
Stefan Heimersheim's avatar
Stefan Heimersheim committed
332
\end{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
333
334
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
Lennart Klebl's avatar
Lennart Klebl committed
335
336
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
337
    \structure{Textausrichting:}
Lennart Klebl's avatar
Lennart Klebl committed
338
    \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
339
    \item Mittig / Linksbündig / Rechtsbündig
Lennart Klebl's avatar
Lennart Klebl committed
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.3\textwidth}
    \lstinputlisting{examples/3b.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.25\textwidth}
        \input{examples/3b.tex}
    \end{minipage}
  };
  \\
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
357
    \structure{Listen:}
Lennart Klebl's avatar
Lennart Klebl committed
358
    \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
359
    \item Stichpunkte / Aufzählungen
Lennart Klebl's avatar
Lennart Klebl committed
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.3\textwidth}
    \lstinputlisting{examples/3c.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.25\textwidth}
    \input{examples/3c.tex}
    \end{minipage}
  };
  \\
375
376
377
378
};
\end{tikzpicture}
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
379
380
\newcommand{\highlightRed}[1]{{\color{Mahogany}\texttt{\bfseries #1}}}
\newcommand{\highlightBlu}[1]{{\color{RoyalBlue}\texttt{\bfseries #1}}}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
381

Lennart Klebl's avatar
Lennart Klebl committed
382
\begin{frame}[fragile]{Mathematik}
Lennart Klebl's avatar
Lennart Klebl committed
383
384
385
386
387
388
389
390
391
392
  \structure{Umgebungen:}
  \begin{itemize}
    \item \highlightBlu{equation}: Vom Text abgesetzte Gleichung
    \item \highlightBlu{align}: Wie \highlightBlu{equation}, nur dass man an \highlightRed{\&}
      \glqq tabben\grqq\ kann
    \item Wie bei z.\,B. \highlightRed{\textbackslash section*\{...\}} auch hier \highlightRed{*} für
      nicht-nummerierte Gleichungen, also \highlightRed{\textbackslash begin\{}%
      \highlightBlu{align*}\highlightRed{\}}
  \end{itemize}
  \structure{Im Textfluss} kann man Gleichungen mit \highlightRed{\$ ... \$}
Lennart Klebl's avatar
Lennart Klebl committed
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
  schreiben, also z.\,B.
  \begin{center}
    \begin{tikzpicture}
      \node[matrix, column sep=4pt, row sep=6pt] {
      \node[draw=blue!20!lightgray,line width=2pt]{
        \begin{minipage}[t][7mm][c]{.45\textwidth}
          \texttt{Gleichung: \highlightRed{\$x\^\ 2 = 25\$}}
        \end{minipage}
      };&
      \node{\includegraphics[width=12pt]{figures/texstudio-compile.pdf}};&
      \node[draw=blue!20!lightgray,line width=2pt]{
        \begin{minipage}[t][7mm][c]{.3\textwidth}
          \textrm{Gleichung: $x^2 = 25$}
        \end{minipage}
      };\\
    };
    \end{tikzpicture}
  \end{center}
Lennart Klebl's avatar
Lennart Klebl committed
411
412
413
\end{frame}

\begin{frame}[fragile]{Mathematik -- Beispiele}
Lennart Klebl's avatar
Lennart Klebl committed
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
  \begin{tikzpicture}
      \node[matrix, column sep=4pt, row sep=6pt] {
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            \scriptsize \ttfamily \verb|\vec x^2 = x_1^2 + x_2^2|
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            $\displaystyle \vec x^2 = x_1^2 + x_2^2 $
          \end{minipage}
        };
        \\
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.4\textwidth}
            \centering
Lennart Klebl's avatar
Lennart Klebl committed
433
434
            \scriptsize \ttfamily \verb|\sum_{n=0}^\infty n =|
            \verb|-\frac{1}{12}|
Lennart Klebl's avatar
Lennart Klebl committed
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.4\textwidth}
            \centering
            $\displaystyle\sum_{n=0}^\infty n = -\frac{1}{12}$
          \end{minipage}
        };
        \\
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            \scriptsize \ttfamily
            \verb|\nabla\cdot\vec E = 4\pi\rho|
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            $\displaystyle\nabla\cdot\vec E = 4\pi\rho$
          \end{minipage}
        };
        \\
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            \scriptsize \ttfamily
            \verb|\sqrt{e^{i\pi}} = \pm i|
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            $\displaystyle \sqrt{e^{i\pi}} = \pm i$
          \end{minipage}
        };
        \\
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.4\textwidth}
            \centering
            \scriptsize \ttfamily
Lennart Klebl's avatar
Lennart Klebl committed
479
            \verb|\sin(30^\circ) =| \verb|\frac{\sqrt{3}}{2}|
Lennart Klebl's avatar
Lennart Klebl committed
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][10mm][c]{.4\textwidth}
            \centering
            $\displaystyle \sin(30^\circ) = \frac{\sqrt{3}}{2}$
          \end{minipage}
        };
        \\
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            \scriptsize \ttfamily
            \verb|m\approx 80\,\mathrm{kg}|
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][7mm][c]{.4\textwidth}
            \centering
            $\displaystyle m\approx 80\,\mathrm{kg}$
          \end{minipage}
        };
        \\
      };
    \end{tikzpicture}
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
509
510
\begin{frame}{Detexify}{\url{http://detexify.kirelabs.org}}
  \vspace{-18pt}
Lennart Klebl's avatar
Lennart Klebl committed
511
  \includegraphics[width=\textwidth]{figures/detexify.png}
Lennart Klebl's avatar
Lennart Klebl committed
512
513
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
514
\begin{frame}[fragile]{Bilder \& Tabellen}
Lennart Klebl's avatar
Lennart Klebl committed
515
516
517
518
  \begin{itemize}
    \item \highlightRed{\textbackslash%
      includegraphics}\texttt{[optional]}\highlightRed{\{\}}, um Bilder
      einzubinden (bspw. \texttt{width=0.9\textbackslash textwidth} als Option)
Lennart Klebl's avatar
Lennart Klebl committed
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
    \begin{tikzpicture}
      \node[matrix,column sep=4pt, row sep=6pt] {
        \node[draw=blue!20!lightgray,line width=2pt]{
          \begin{minipage}[t][1.0cm][c]{.4\textwidth}
            \lstinputlisting[basicstyle=\tiny]{examples/includegraphics.tex}
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray,line width=2pt]{
          \begin{minipage}[t][1.0cm][c]{.3\textwidth}
            \centering
            \includegraphics[width=1.0cm]{figures/doge.png}
          \end{minipage}
        }; \\
      };
    \end{tikzpicture}
Lennart Klebl's avatar
Lennart Klebl committed
535
    \item \highlightBlu{tabular}-Umgebung für Tabellen:
Lennart Klebl's avatar
Lennart Klebl committed
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
    \begin{tikzpicture}
      \node[matrix, column sep=4pt, row sep=6pt] {
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][1.8cm][c]{.4\textwidth}
            \lstinputlisting[basicstyle=\tiny]{examples/tabular.tex}
          \end{minipage}
        }; &
        \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
        \node[draw=blue!20!lightgray, line width=2pt]{
          \begin{minipage}[t][1.8cm][c]{.3\textwidth}
            \includegraphics[width=\textwidth]{examples/tabular.pdf}
          \end{minipage}
        }; \\
      };
    \end{tikzpicture}
Lennart Klebl's avatar
Lennart Klebl committed
551
  \end{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
552
553
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
554
\begin{frame}[fragile]{Labels, Referenzen und Links}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
555
\structure{Referenzen} markieren mit \texttt{\textbackslash label}, verweisen mit \texttt{\textbackslash ref}:
Stefan Heimersheim's avatar
Stefan Heimersheim committed
556
557
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
Lennart Klebl's avatar
Lennart Klebl committed
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
    \begin{itemize}
    \item Gleichungen, Sections, \textbf{Figures} und vieles mehr!
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.3\textwidth}
    \lstinputlisting{examples/4a.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.25\textwidth}
    \input{examples/4a.tex}
    \end{minipage}
  };
  \\
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
    \begin{itemize}
    \item \texttt{ref} darf auch vor vor dem \texttt{label} stehen
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.3\textwidth}
    \lstinputlisting{examples/4b.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
    \begin{minipage}[t][30mm][c]{.25\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
592
          \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4b_fake.png}
Lennart Klebl's avatar
Lennart Klebl committed
593
594
595
    \end{minipage}
  };
  \\
Stefan Heimersheim's avatar
Stefan Heimersheim committed
596
597
};
\end{tikzpicture}
Lennart Klebl's avatar
Lennart Klebl committed
598
599
\end{frame}

600
601
\begin{frame}[fragile]{Verschiedenes}
  \structure{Fußnoten:}
Lennart Klebl's avatar
Lennart Klebl committed
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
  \begin{itemize}
    \item Einfügen mit \verb|\footnote{Fußnotentext}| irgendwo:
  \end{itemize}
  \begin{tikzpicture}
  \node[matrix, column sep=4pt, row sep=6pt] {
    \node[draw=blue!20!lightgray, line width=2pt]{
      \begin{minipage}[t][30mm][c]{.5\textwidth}
      \lstinputlisting{examples/4c.tex}
      \end{minipage}
    }; &
    \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
    \node[draw=blue!20!lightgray, line width=2pt]{
      \begin{minipage}[t][30mm][c]{.3\textwidth}
      \includegraphics[width=1\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4c_fake.png}
      \end{minipage}
    };
    \\
  };
  \end{tikzpicture}
621
622
  \structure{Besondere Zeichen}
  \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
623
624
625
626
    \item \%: \texttt{\textbackslash\%} 
    \item \&, \#, \$: \texttt{\textbackslash\&, \textbackslash\#, \textbackslash\$}
    \item \textbackslash, \{, \}: \texttt{\textbackslash textbackslash, \textbackslash\{, \textbackslash\}}
    %todo besser sortieren, noch was vergessen?
627
  \end{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
628
629
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
\begin{frame}[fragile]{Präambel}
  \begin{columns}
    \begin{column}{0.4\textwidth}
      \structure{Die \glqq{Präambel}\grqq} wird benutzt für
      \begin{itemize}
        \item \glqq{Dokumentenklasse\grqq} -- also \emph{Vorlage}
          (\highlightRed{\textbackslash{}documentclass})
        \item Pakete laden (\highlightRed{\textbackslash{}usepackage})
        \item Macros definieren (\highlightRed{\textbackslash{}newcommand})
        \item \highlightRed{\textbackslash{}begin}\verb+{document}+ \\
          (\highlightRed{\textbackslash{}end}\verb+{document}+)
        \item {\color{Gray}optionale Einstellungen}
          %TODO wegnehmen?
      \end{itemize}
    \end{column}
    \begin{column}{0.05\textwidth}
      \only<1>{ %
        \color{RoyalBlue}\rule{0.5pt}{0.8\textheight} %
      } %
      \only<2>{ %
        \color{Green}\rule{0.5pt}{0.8\textheight} %
      } %
    \end{column}
    \begin{column}{0.55\textwidth}
      \only<1>{\lstinputlisting[basicstyle=\tiny\ttfamily]{examples/preamble.tex}}
      \only<2>{\includegraphics[width=0.8\textwidth]{examples/preamble.pdf}}
    \end{column}
  \end{columns}
Lennart Klebl's avatar
Lennart Klebl committed
658
659
\end{frame}

660
\end{document}
Lennart Klebl's avatar
Lennart Klebl committed
661
662
663
664

\begin{comment}
vim:ts=2:spelllang=de:fo=want:spell
\end{comment}