latex.tex 23.4 KB
Newer Older
Stefan Heimersheim's avatar
Stefan Heimersheim committed
1
\documentclass[xcolor=dvipsnames]{beamer}
2

Lennart Klebl's avatar
präsi    
Lennart Klebl committed
3
4
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
5
\usepackage[ngerman]{babel}
Lennart Klebl's avatar
präsi    
Lennart Klebl committed
6
%\usepackage{lmodern}
7
8
\usepackage{verbatim}
\usepackage{dtk-logos}
9
\usepackage{tikz}
Valentin Bruch's avatar
Valentin Bruch committed
10
\usetikzlibrary{backgrounds, fit, matrix, calc}
11
12
\usepackage{listings}
\usepackage{calc}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
13
\graphicspath{{figures/}{examples/}}
Lennart Klebl's avatar
Lennart Klebl committed
14
\usefonttheme{professionalfonts}
Lennart Klebl's avatar
Lennart Klebl committed
15
\newcommand{\bsl}{\textbackslash}
16

Lennart Klebl's avatar
präsi    
Lennart Klebl committed
17
18
\hypersetup{unicode=true}

Lennart Klebl's avatar
Lennart Klebl committed
19
20
\setmonofont{FiraCode}

21
22
\usetheme{OSAK}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
23
\lstset{
Lennart Klebl's avatar
Lennart Klebl committed
24
25
26
27
28
  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
29
  moretexcs={lstset,subsubsection,paragraph,subsection,color,sl,textcolor,lstinputlisting,newfontfamily,fontsize,section,documentclass,begin,includegraphics,hello,bye,setmainlanguage,setlength},
Lennart Klebl's avatar
Lennart Klebl committed
30
  morekeywords={center,document,flushleft,flushright,itemize,enumerate,tabular,article,polyglossia,geometry,amsmath,graphicx,xcolor,hyperref,figure,babel,mathtools}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
31
32
}

33
34
35
36
\makeatletter
\newcommand\notsotiny{\@setfontsize\notsotiny{7}{8}}
\makeatother

Lennart Klebl's avatar
Lennart Klebl committed
37
38
39
\date{05.06.2019}
\title[Einführung in \LaTeX]{Einführung in \LaTeX}
\author{Valentin Bruch}
40
41
42
43
44
45
\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
  % USAGE: \marginbox[margin width]{width}{content}
  \setlength\marginwidth{#1}
Valentin Bruch's avatar
Valentin Bruch committed
50
51
  \begin{tikzpicture}[even odd rule, scale=1]
    \node[anchor=north west] (text) {%
Valentin Bruch's avatar
Valentin Bruch committed
52
53
      \begin{minipage}{#2-2\marginwidth-10pt}%
        #3%
Valentin Bruch's avatar
Valentin Bruch committed
54
55
56
57
58
59
60
61
      \end{minipage}%
    };
    \begin{pgfonlayer}{background}
      \node[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)] {};
    \end{pgfonlayer}
  \end{tikzpicture}
}

62
63
64
\begin{document}

\begin{frame}{OSAK \LaTeX-Workshop}{Installation einer \TeX-Distribution}
Lennart Klebl's avatar
Lennart Klebl committed
65
  \Huge\% TODO QR CODE UND URL
66
67
68
69
70
71
72
73
74
75
  \Huge QR-CODE UND/ODER URL
\end{frame}

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

\section{Motivation}
\section{Dokumente mit \LaTeX}
\subsection{\TeX{}studio als Editor}
76
77
\subsection{Aufbau eines \LaTeX-Dokuments}
\OSAKthemenologo
Lennart Klebl's avatar
Lennart Klebl committed
78
\begin{frame}[fragile]{Aufbau eines \LaTeX-Dokuments}
79
  \begin{columns}[T]
Lennart Klebl's avatar
Lennart Klebl committed
80
81
    \begin{column}{.45\textwidth}
      \structure{{\LaTeX} übersetzt Text in ein PDF} \\[12pt]
82
      \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
83
84
85
86
        \item Automatische Formatierung \\[12pt]
        \item Befehle, z.\,B. \texttt{\textbackslash textbf\{\}}, haben Effekte 
          (z.\,B. \textbf{fett}) \\[12pt]
        \item Kommentare (mit \%) werden ignoriert \\[12pt]
87
88
      \end{itemize}
    \end{column}
Lennart Klebl's avatar
Lennart Klebl committed
89
    \begin{column}{.5\textwidth}
90
91
92
93
94
95
96
97
98
      \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}{%
Lennart Klebl's avatar
Lennart Klebl committed
99
            \lstinputlisting[basicstyle=\scriptsize\ttfamily]{examples/minimal.tex}
100
101
102
103
104
105
106
107
108
109
        }};
      \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
110
          \hspace{.1\textwidth}$\mathrm{Hallo\ Welt!}$
111
112
113
114
115
116
        }};
      \end{tikzpicture}
    \end{column}
  \end{columns}
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
117
118
% Logo einblenden
\OSAKthemelogo
119
120
\subsection{Beispieldokument}
\section{Präsentationen mit \LaTeX-Beamer}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
121
% Logo ausblenden
122
123
\OSAKthemenologo

Lennart Klebl's avatar
Lennart Klebl committed
124
125
126
127
\begin{frame}{TeXStudio (Editor)}
  \vspace{-8pt}
  \includegraphics[width=\textwidth]{figures/texstudio.png}
\end{frame}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
128

Stefan Heimersheim's avatar
Stefan Heimersheim committed
129
130
\begin{frame}[fragile]{Umbrüche}
  \structure{Zeilen:}
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
  \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
155
                \item Leere Zeile\\$\implies$ Absatz
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
            \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
174
                \item Zeilenumbruch manuell: \texttt{\textbackslash\textbackslash}
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
            \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
192
  \structure{Seiten:}
193
194
195
196
197
  \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
198
                \item Manuell neue Seite:
199
200
201
202
203
204
205
206
207
208
209
            \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}
Lennart Klebl's avatar
Lennart Klebl committed
210
            \includegraphics[width=\textwidth]{figures/newpage.png}
211
212
213
214
215
          \end{minipage}
        };
        \\
      };
    \end{tikzpicture}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
216

217
218
\end{frame}

219

Stefan Heimersheim's avatar
Stefan Heimersheim committed
220
\begin{frame}[fragile]{Formatierung}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
221
\structure{Schrifteinstellungen:}
222
223
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
Lennart Klebl's avatar
Lennart Klebl committed
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
  \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
262
263
      \Large Large\,\LARGE LARGE\\
      ...
Lennart Klebl's avatar
Lennart Klebl committed
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
    \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
286
287
288
289
};
\end{tikzpicture}
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
290
\begin{frame}[fragile]{Abschnitte}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
291
\begin{columns}
Lennart Klebl's avatar
Lennart Klebl committed
292
293
294
  \begin{column}{0.4\textwidth}
    \structure{section, subsection, subsubsection:}
    \begin{itemize}
Lennart Klebl's avatar
floats    
Lennart Klebl committed
295
      \item Überschriften (automatisch nummeriert)
Lennart Klebl's avatar
Lennart Klebl committed
296
297
298
299
300
301
302
303
304
305
306
307
      \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
308
      \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/2h_fake.pdf}
Lennart Klebl's avatar
Lennart Klebl committed
309
  \end{column}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
310
\end{columns}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
311
312
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
313
314
\begin{frame}[fragile]{Umgebungen}
\begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
315
  \setbeamertemplate{itemize items}[square]
Lennart Klebl's avatar
Lennart Klebl committed
316
317
\item Umgebungen durch \texttt{\color{Mahogany}\bfseries\textbackslash begin} 
  und \texttt{\color{Mahogany}\bfseries\textbackslash end} begrenzt
Stefan Heimersheim's avatar
Stefan Heimersheim committed
318
\end{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
319
320
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
Lennart Klebl's avatar
Lennart Klebl committed
321
322
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
323
    \structure{Textausrichting:}
Lennart Klebl's avatar
Lennart Klebl committed
324
    \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
325
    \item Mittig / Linksbündig / Rechtsbündig
Lennart Klebl's avatar
Lennart Klebl committed
326
327
328
329
    \end{itemize}
    \end{minipage}
  }; &
  \node[draw=blue!20!lightgray, line width=2pt]{
Richard Zameitat's avatar
Richard Zameitat committed
330
    \begin{minipage}[t][34mm][c]{.3\textwidth}
Lennart Klebl's avatar
Lennart Klebl committed
331
332
333
334
335
    \lstinputlisting{examples/3b.tex}
    \end{minipage}
  }; &
  \node{\includegraphics[width=16pt]{figures/texstudio-compile.pdf}}; &
  \node[draw=blue!20!lightgray, line width=2pt]{
Richard Zameitat's avatar
Richard Zameitat committed
336
    \begin{minipage}[t][34mm][c]{.25\textwidth}
Lennart Klebl's avatar
Lennart Klebl committed
337
338
339
340
341
342
        \input{examples/3b.tex}
    \end{minipage}
  };
  \\
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
343
    \structure{Listen:}
Lennart Klebl's avatar
Lennart Klebl committed
344
    \begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
345
    \item Stichpunkte / Aufzählungen
Lennart Klebl's avatar
Lennart Klebl committed
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
    \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}
  };
  \\
361
362
363
364
};
\end{tikzpicture}
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
365
366
\newcommand{\highlightRed}[1]{{\color{Mahogany}\texttt{\bfseries #1}}}
\newcommand{\highlightBlu}[1]{{\color{RoyalBlue}\texttt{\bfseries #1}}}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
367

Lennart Klebl's avatar
Lennart Klebl committed
368
\begin{frame}[fragile]{Mathematik}
Lennart Klebl's avatar
Lennart Klebl committed
369
  \structure{Umgebungen:} \\[10pt]
Lennart Klebl's avatar
Lennart Klebl committed
370
  \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
371
372
    \item \highlightBlu{equation}{\bfseries:} Vom Text abgesetzte Gleichung 
      \\[10pt]
Richard Zameitat's avatar
Richard Zameitat committed
373
    \item \highlightBlu{align}{\bfseries:} Wie \highlightBlu{equation}, nur dass man an \highlightRed{\&}
Lennart Klebl's avatar
Lennart Klebl committed
374
375
376
      \glqq tabben\grqq\ kann  \\[10pt]
    \item Wie bei z.\,B.  \highlightRed{\textbackslash section*\{...\}} auch 
      hier \highlightRed{*} für
Lennart Klebl's avatar
Lennart Klebl committed
377
      nicht-nummerierte Gleichungen, also \highlightRed{\textbackslash begin\{}%
Lennart Klebl's avatar
Lennart Klebl committed
378
      \highlightBlu{align*}\highlightRed{\}} \\[10pt]
Lennart Klebl's avatar
Lennart Klebl committed
379
380
  \end{itemize}
  \structure{Im Textfluss} kann man Gleichungen mit \highlightRed{\$ ... \$}
Lennart Klebl's avatar
Lennart Klebl committed
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
  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
399
400
401
\end{frame}

\begin{frame}[fragile]{Mathematik -- Beispiele}
Lennart Klebl's avatar
Lennart Klebl committed
402
403
404
405
406
  \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
Lennart Klebl's avatar
Lennart Klebl committed
407
            \scriptsize \ttfamily \verb|\vec{x}^2 = x_1^2 + x_2^2|
Lennart Klebl's avatar
Lennart Klebl committed
408
409
410
411
412
413
414
415
416
417
418
419
420
          \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
421
422
            \scriptsize \ttfamily \verb|\sum_{n=0}^\infty n =|
            \verb|-\frac{1}{12}|
Lennart Klebl's avatar
Lennart Klebl committed
423
424
425
426
427
428
429
430
431
432
433
434
435
436
          \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
Lennart Klebl's avatar
Lennart Klebl committed
437
            \verb|\nabla\cdot\vec{E} = 4\pi\rho|
Lennart Klebl's avatar
Lennart Klebl committed
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
          \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
467
            \verb|\sin(30^\circ) =| \verb|\frac{\sqrt{3}}{2}|
Lennart Klebl's avatar
Lennart Klebl committed
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
          \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
497
498
\begin{frame}{Detexify}{\url{http://detexify.kirelabs.org}}
  \vspace{-18pt}
Lennart Klebl's avatar
Lennart Klebl committed
499
  \includegraphics[width=\textwidth]{figures/detexify.png}
Lennart Klebl's avatar
Lennart Klebl committed
500
501
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
502
\begin{frame}[fragile]{Bilder \& Tabellen}
Lennart Klebl's avatar
Lennart Klebl committed
503
504
505
506
  \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
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
    \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}
        }; \\
      };
Lennart Klebl's avatar
Lennart Klebl committed
522
    \end{tikzpicture} \\[12pt]
Lennart Klebl's avatar
Lennart Klebl committed
523
    \item \highlightBlu{tabular}-Umgebung für Tabellen:
Lennart Klebl's avatar
Lennart Klebl committed
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
    \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
539
  \end{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
540
541
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
542
\begin{frame}[fragile]{Abbildungen mit \glqq{}Floats\grqq{}}
543
544
  \begin{columns}
    \begin{column}{0.45\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
545
546
      \highlightBlu{figure} \& \highlightBlu{table} \emph{Umgebungen} für
      Bilder und Tabellen:\vspace{14pt}
547
548
      \begin{itemize}
          \small
Stefan Heimersheim's avatar
Stefan Heimersheim committed
549
550
551
552
553
554
555
556
557
558
        \item Mit \highlightRed{\textbackslash{}includegraphics} bzw.
        \highlightBlu{tabular} für Inhalt
          \scriptsize\\
(\emph{{\ttfamily\color{RoyalBlue}table} \& 
    {\ttfamily\color{RoyalBlue}figure} sind initial leer!})
\normalsize
\\[12pt]
        \item \highlightRed{\textbackslash{}centering} für zentrierten Inhalt \\[12pt]
        \item \highlightRed{\textbackslash{}caption}\verb+{Text}+ für Beschriftung und Verweise\\[12pt]

559
560
561
562
563
564
565
566
567
568
        % TODO Bild von float machen!
      \end{itemize}
    \end{column}
    \begin{column}{0.45\textwidth}
      \begin{tikzpicture}
        \node[matrix,column sep=4pt, row sep=6pt] {
          \node[draw=blue!20!lightgray,line width=2pt]{
            \begin{minipage}[t][2.1cm][c]{\textwidth}
              \lstinputlisting[basicstyle=\tiny]{examples/figure.tex}
            \end{minipage}
Lennart Klebl's avatar
Lennart Klebl committed
569
          }; \\[-4pt]
570
571
          \node[rotate=270]{
            \includegraphics[width=16pt]{figures/texstudio-compile.pdf}
Lennart Klebl's avatar
Lennart Klebl committed
572
          }; \\[-4pt]
573
574
575
576
577
578
579
580
581
582
          \node[draw=blue!20!lightgray,line width=2pt]{
            \begin{minipage}[t][2.75cm][c]{\textwidth}
              \centering
              \includegraphics[width=0.7\textwidth]{examples/figure.pdf}
            \end{minipage}
          }; \\
        };
      \end{tikzpicture}
    \end{column}
  \end{columns}
Lennart Klebl's avatar
floats    
Lennart Klebl committed
583
584
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
585
\begin{frame}[fragile]{Labels, Referenzen und Links}
Lennart Klebl's avatar
Lennart Klebl committed
586
587
588
  \structure{Referenzen} markieren mit 
  \texttt{\bfseries\color{Mahogany}\textbackslash label},
  verweisen mit \texttt{\bfseries\color{Mahogany}\textbackslash ref}:
Stefan Heimersheim's avatar
Stefan Heimersheim committed
589
590
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
Lennart Klebl's avatar
Lennart Klebl committed
591
592
593
  \node{
    \begin{minipage}[t][10mm][c]{.28\textwidth}
    \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
594
    \item Gleichungen, Sections, Figures und vieles mehr!
Lennart Klebl's avatar
Lennart Klebl committed
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
    \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}
Lennart Klebl's avatar
Lennart Klebl committed
613
614
    \item \highlightRed{\bsl ref} darf auch vor vor dem \highlightRed{\bsl 
      label} stehen
Lennart Klebl's avatar
Lennart Klebl committed
615
616
617
618
619
620
621
622
623
624
625
    \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
626
          \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4b_fake.png}
Lennart Klebl's avatar
Lennart Klebl committed
627
628
629
    \end{minipage}
  };
  \\
Stefan Heimersheim's avatar
Stefan Heimersheim committed
630
631
};
\end{tikzpicture}
Lennart Klebl's avatar
Lennart Klebl committed
632
633
\end{frame}

634
635
\begin{frame}[fragile]{Verschiedenes}
  \structure{Fußnoten:}
Lennart Klebl's avatar
Lennart Klebl committed
636
  \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
637
638
    \item Einfügen mit \highlightRed{\bsl footnote}\verb+{Fußnotentext}+
      irgendwo:
Lennart Klebl's avatar
Lennart Klebl committed
639
  \end{itemize}
640
641
  \begin{center}
    \vspace{-6pt}
Lennart Klebl's avatar
Lennart Klebl committed
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
  \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}
658
659
    \vspace{-6pt}
  \end{center}
660
661
  \structure{Besondere Zeichen}
  \begin{itemize}
662
663
664
665
666
667
668
    \item {\bfseries\color{MidnightBlue}\%, "{}}: \texttt{\textbackslash\%}, \verb+"{}+
    \item {\bfseries\color{MidnightBlue}\&, \#, \$}: \texttt{\textbackslash\&, 
      \textbackslash\#, \textbackslash\$}
    \item {\bfseries\color{MidnightBlue}\textbackslash, \{, \}}: \texttt{\textbackslash 
      textbackslash, \textbackslash\{, \textbackslash\}}
    \item {\bfseries\color{MidnightBlue}\^~, \_, \textasciitilde}: %
      \verb|\^, \_, \textasciitilde|
Lennart Klebl's avatar
präsi    
Lennart Klebl committed
669
      %todo besser sortieren, noch was vergessen?
670
  \end{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
671
672
\end{frame}

Lennart Klebl's avatar
Lennart Klebl committed
673
674
675
\begin{frame}[fragile]{Präambel}
  \begin{columns}
    \begin{column}{0.4\textwidth}
Lennart Klebl's avatar
Lennart Klebl committed
676
      \structure{Die \glqq{Präambel}\grqq} wird benutzt für \\[3pt]
Lennart Klebl's avatar
Lennart Klebl committed
677
      \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
678
679
680
681
682
683
        \item Dokumententyp: \\
          \highlightRed{\textbackslash{}documentclass} \\[4pt]
        \item Pakete laden: \\
          \highlightRed{\textbackslash{}usepackage} \\[4pt]
        \item Macros definieren: \\
          \highlightRed{\textbackslash{}newcommand} \\[4pt]
Lennart Klebl's avatar
Lennart Klebl committed
684
        \item \highlightRed{\textbackslash{}begin}\verb+{document}+ \\
Lennart Klebl's avatar
Lennart Klebl committed
685
          \highlightRed{\textbackslash{}end}\verb+{document}+
Lennart Klebl's avatar
Lennart Klebl committed
686
687
      \end{itemize}
    \end{column}
Lennart Klebl's avatar
Lennart Klebl committed
688
    \hspace{10pt}
Lennart Klebl's avatar
Lennart Klebl committed
689
    \begin{column}{0.05\textwidth}
Lennart Klebl's avatar
präsi    
Lennart Klebl committed
690
      {\only<1>{\color{RoyalBlue}}\only<2>{\color{Green}}\rule{0.5pt}{0.8\textheight}}
Lennart Klebl's avatar
Lennart Klebl committed
691
692
693
    \end{column}
    \begin{column}{0.55\textwidth}
      \only<1>{\lstinputlisting[basicstyle=\tiny\ttfamily]{examples/preamble.tex}}
694
      \only<2>{\vspace{-.5em}\includegraphics[width=0.8\textwidth]{examples/preamble.pdf}}
Lennart Klebl's avatar
Lennart Klebl committed
695
    \end{column}
Lennart Klebl's avatar
Lennart Klebl committed
696
    \hspace{-10pt}
Lennart Klebl's avatar
Lennart Klebl committed
697
  \end{columns}
Lennart Klebl's avatar
Lennart Klebl committed
698
699
\end{frame}

700
\end{document}
Lennart Klebl's avatar
Lennart Klebl committed
701
702

\begin{comment}
703
vim:ts=2:spelllang=de:fo=want:expandtab
Lennart Klebl's avatar
Lennart Klebl committed
704
\end{comment}