latex.tex 24.9 KB
Newer Older
Stefan Heimersheim's avatar
Stefan Heimersheim committed
1
\documentclass[xcolor=dvipsnames]{beamer}
2
3
4
5
6
7
\newif\ifshownotes
\ifdefined\shownotes
  \shownotestrue
\else
  \shownotesfalse
\fi
8

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

23
24
\renewcommand\note[2][]{\ifshownotes#1{\color[rgb]{0,.5,0}#2}\fi}

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

Lennart Klebl's avatar
Lennart Klebl committed
27
28
\setmonofont{FiraCode}

29
30
\usetheme{OSAK}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
31
\lstset{
Lennart Klebl's avatar
Lennart Klebl committed
32
33
34
35
36
  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
37
  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
38
  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
39
40
}

41
42
43
44
\makeatletter
\newcommand\notsotiny{\@setfontsize\notsotiny{7}{8}}
\makeatother

45
\date{5. Juni 2019}
Lennart Klebl's avatar
Lennart Klebl committed
46
47
\title[Einführung in \LaTeX]{Einführung in \LaTeX}
\author{Valentin Bruch}
48
49
50
51
52
53
\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
54
\newlength\marginwidth
Valentin Bruch's avatar
Valentin Bruch committed
55
\newcommand\marginbox[3][2pt]{
Valentin Bruch's avatar
Valentin Bruch committed
56
57
  % USAGE: \marginbox[margin width]{width}{content}
  \setlength\marginwidth{#1}
Valentin Bruch's avatar
Valentin Bruch committed
58
59
  \begin{tikzpicture}[even odd rule, scale=1]
    \node[anchor=north west] (text) {%
Valentin Bruch's avatar
Valentin Bruch committed
60
61
      \begin{minipage}{#2-2\marginwidth-10pt}%
        #3%
Valentin Bruch's avatar
Valentin Bruch committed
62
63
64
65
66
67
68
69
      \end{minipage}%
    };
    \begin{pgfonlayer}{background}
      \node[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)] {};
    \end{pgfonlayer}
  \end{tikzpicture}
}

70
71
\begin{document}

Valentin Bruch's avatar
Valentin Bruch committed
72
\section{Installation und Motivation}
73
\begin{frame}{OSAK \LaTeX-Workshop}{Installation einer \TeX-Distribution}
Lennart Klebl's avatar
Lennart Klebl committed
74
  \Huge\% TODO QR CODE UND URL
75
76
77
78
79
80
81
82
  \Huge QR-CODE UND/ODER URL
\end{frame}

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

\section{Dokumente mit \LaTeX}
83
84
\subsection{Aufbau eines \LaTeX-Dokuments}
\OSAKthemenologo
Lennart Klebl's avatar
Lennart Klebl committed
85
\begin{frame}[fragile]{Aufbau eines \LaTeX-Dokuments}
86
  \begin{columns}[T]
Lennart Klebl's avatar
Lennart Klebl committed
87
88
    \begin{column}{.45\textwidth}
      \structure{{\LaTeX} übersetzt Text in ein PDF} \\[12pt]
89
      \begin{itemize}
90
        \note[\item]{Wer hat schon mal ein Dokument erstellt?\\[10pt]}
Lennart Klebl's avatar
Lennart Klebl committed
91
92
93
94
        \item Automatische Formatierung \\[12pt]
        \item Befehle, z.\,B. \texttt{\textbackslash textbf\{\}}, haben Effekte 
          (z.\,B. \textbf{fett}) \\[12pt]
        \item Kommentare (mit \%) werden ignoriert \\[12pt]
95
96
      \end{itemize}
    \end{column}
Lennart Klebl's avatar
Lennart Klebl committed
97
    \begin{column}{.5\textwidth}
98
99
100
101
102
103
104
105
106
      \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
107
            \lstinputlisting[basicstyle=\scriptsize\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}

125
\subsection{\TeX{}studio als Editor}
126
127
\begin{frame}{\TeX{}Studio (Editor)}
  \vspace{-3.8pt}%
Lennart Klebl's avatar
Lennart Klebl committed
128
129
  \includegraphics[width=\textwidth]{figures/texstudio.png}
\end{frame}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
130

Valentin Bruch's avatar
Valentin Bruch committed
131
\subsection{Absatzformatierung}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
132
133
\begin{frame}[fragile]{Umbrüche}
  \structure{Zeilen:}
134
  \vskip-\baselineskip%
135
  \begin{tikzpicture}
136
    \node[matrix, column sep=4pt, row sep=6pt] {
137
138
      & \node[anchor=base]{\texttt{dokument.tex}}; &
      & \node[anchor=base]{\texttt{dokument.pdf}}; \\
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
      \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}
              \item Leere Zeile\\$\implies$ Absatz
          \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}
              \item Zeilenumbruch manuell: \texttt{\textbackslash\textbackslash}
          \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}
194
      };
195
196
197
      \\
    };
  \end{tikzpicture}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
198
  \structure{Seiten:}
199
  \begin{tikzpicture}
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
    \node[matrix, column sep=4pt, row sep=6pt] {
      \node{
        \begin{minipage}[t][10mm][c]{.28\textwidth}
          \begin{itemize}
              \item Manuell neue Seite:
          \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}
          \includegraphics[width=\textwidth]{figures/newpage.png}
        \end{minipage}
218
      };
219
220
221
      \\
    };
  \end{tikzpicture}
222
223
\end{frame}

Valentin Bruch's avatar
Valentin Bruch committed
224
\subsection{Textformatierung}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
225
\begin{frame}[fragile]{Formatierung}
226
227
228
229
  \structure{Schrifteinstellungen:}
  \vskip-\baselineskip%
  \begin{tikzpicture}
    \node[matrix, column sep=4pt, row sep=6pt] {
230
231
      & \node[anchor=base]{\texttt{dokument.tex}}; &
      & \node[anchor=base]{\texttt{dokument.pdf}}; \\
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
      \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\\
          \Large Large\,\LARGE LARGE\\
          ...
        \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}
      };
      \\
Lennart Klebl's avatar
Lennart Klebl committed
294
  };
295
  \end{tikzpicture}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
296
297
\end{frame}

Valentin Bruch's avatar
Valentin Bruch committed
298
\subsection{Abschnitte}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
299
\begin{frame}[fragile]{Abschnitte}
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
  \begin{columns}
    \begin{column}{0.48\textwidth}
      \structure{section, subsection, subsubsection:}
      \begin{itemize}
        \item Überschriften\\(automatisch nummeriert)\\[2pt]
          \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)\\[2pt]
          \texttt{\textbackslash tableofcontents}
      \end{itemize}
      \vspace*{24pt}
    \end{column}
    \begin{column}{0.5\textwidth}
        \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/2h_fake.pdf}
    \end{column}
  \end{columns}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
321
322
\end{frame}

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

Lennart Klebl's avatar
Lennart Klebl committed
376
377
\newcommand{\highlightRed}[1]{{\color{Mahogany}\texttt{\bfseries #1}}}
\newcommand{\highlightBlu}[1]{{\color{RoyalBlue}\texttt{\bfseries #1}}}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
378

Valentin Bruch's avatar
Valentin Bruch committed
379
380
\section{Mathematik}
% TODO: Anders strukturieren, explizites Beispiel für \begin{equation}... ?
Lennart Klebl's avatar
Lennart Klebl committed
381
\begin{frame}[fragile]{Mathematik}
Lennart Klebl's avatar
Lennart Klebl committed
382
  \structure{Umgebungen:} \\[10pt]
Lennart Klebl's avatar
Lennart Klebl committed
383
  \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
384
385
    \item \highlightBlu{equation}{\bfseries:} Vom Text abgesetzte Gleichung 
      \\[10pt]
Richard Zameitat's avatar
Richard Zameitat committed
386
    \item \highlightBlu{align}{\bfseries:} Wie \highlightBlu{equation}, nur dass man an \highlightRed{\&}
387
388
389
390
      ausrichten kann  \\[10pt]
    \item Wie bei z.\,B.  \highlightRed{\textbackslash section*\{...\}} auch:\\
      \highlightBlu{*} für nicht-nummerierte Gleichungen, also
      \highlightRed{\textbackslash begin\{}%
Lennart Klebl's avatar
Lennart Klebl committed
391
      \highlightBlu{align*}\highlightRed{\}} \\[10pt]
Lennart Klebl's avatar
Lennart Klebl committed
392
  \end{itemize}
393
  \structure{Im Textfluss} kann man Gleichungen mit \highlightRed{\$...\$}
Lennart Klebl's avatar
Lennart Klebl committed
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
  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
412
413
414
\end{frame}

\begin{frame}[fragile]{Mathematik -- Beispiele}
Lennart Klebl's avatar
Lennart Klebl committed
415
416
417
418
419
  \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
420
            \scriptsize \ttfamily \verb|\vec{x}^2 = x_1^2 + x_2^2|
Lennart Klebl's avatar
Lennart Klebl committed
421
422
423
424
425
426
427
428
429
430
431
432
433
          \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
434
435
            \scriptsize \ttfamily \verb|\sum_{n=0}^\infty n =|
            \verb|-\frac{1}{12}|
Lennart Klebl's avatar
Lennart Klebl committed
436
437
438
439
440
441
442
443
444
445
446
447
448
449
          \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
450
            \verb|\nabla\cdot\vec{E} = 4\pi\rho|
Lennart Klebl's avatar
Lennart Klebl committed
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
479
          \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
480
            \verb|\sin(30^\circ) =| \verb|\frac{\sqrt{3}}{2}|
Lennart Klebl's avatar
Lennart Klebl committed
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
509
          \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}

Valentin Bruch's avatar
Valentin Bruch committed
510
\subsection{Detexify}
Lennart Klebl's avatar
Lennart Klebl committed
511
512
\begin{frame}{Detexify}{\url{http://detexify.kirelabs.org}}
  \vspace{-18pt}
Lennart Klebl's avatar
Lennart Klebl committed
513
  \includegraphics[width=\textwidth]{figures/detexify.png}
514
  \note[\centering]{\large auf \texttt{\textbackslash usepackage} achten!}%
Lennart Klebl's avatar
Lennart Klebl committed
515
516
\end{frame}

Valentin Bruch's avatar
Valentin Bruch committed
517
\section{Bilder und Tabellen}
Lennart Klebl's avatar
Lennart Klebl committed
518
\begin{frame}[fragile]{Bilder \& Tabellen}
Lennart Klebl's avatar
Lennart Klebl committed
519
520
  \begin{itemize}
    \item \highlightRed{\textbackslash%
521
      includegraphics}\texttt{[optional]}\highlightRed{\{...\}}, um Bilder
Lennart Klebl's avatar
Lennart Klebl committed
522
      einzubinden (bspw. \texttt{width=0.9\textbackslash textwidth} als Option)
Lennart Klebl's avatar
Lennart Klebl committed
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
    \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
538
    \end{tikzpicture} \\[12pt]
Lennart Klebl's avatar
Lennart Klebl committed
539
    \item \highlightBlu{tabular}-Umgebung für Tabellen:
Lennart Klebl's avatar
Lennart Klebl committed
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
    \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
555
  \end{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
556
557
\end{frame}

Valentin Bruch's avatar
Valentin Bruch committed
558
\subsection{Floats}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
559
\begin{frame}[fragile]{Abbildungen mit \glqq{}Floats\grqq{}}
560
561
  \begin{columns}
    \begin{column}{0.45\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
562
563
      \highlightBlu{figure} \& \highlightBlu{table} \emph{Umgebungen} für
      Bilder und Tabellen:\vspace{14pt}
564
565
      \begin{itemize}
          \small
Stefan Heimersheim's avatar
Stefan Heimersheim committed
566
567
568
        \item Mit \highlightRed{\textbackslash{}includegraphics} bzw.
        \highlightBlu{tabular} für Inhalt
          \scriptsize\\
569
570
571
572
          (\emph{{\ttfamily\color{RoyalBlue}table} \&
          {\ttfamily\color{RoyalBlue}figure} sind initial leer!})
          \normalsize
          \\[12pt]
Stefan Heimersheim's avatar
Stefan Heimersheim committed
573
574
575
        \item \highlightRed{\textbackslash{}centering} für zentrierten Inhalt \\[12pt]
        \item \highlightRed{\textbackslash{}caption}\verb+{Text}+ für Beschriftung und Verweise\\[12pt]

576
577
578
579
580
581
582
583
584
585
        % 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
586
          }; \\[-4pt]
587
588
          \node[rotate=270]{
            \includegraphics[width=16pt]{figures/texstudio-compile.pdf}
Lennart Klebl's avatar
Lennart Klebl committed
589
          }; \\[-4pt]
590
591
592
593
594
595
596
597
598
599
          \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
600
601
\end{frame}

Valentin Bruch's avatar
Valentin Bruch committed
602
\section{Labels und Referenzen}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
603
\begin{frame}[fragile]{Labels, Referenzen und Links}
Lennart Klebl's avatar
Lennart Klebl committed
604
605
  \structure{Referenzen} markieren mit 
  \texttt{\bfseries\color{Mahogany}\textbackslash label},
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
  verweisen mit \texttt{\bfseries\color{Mahogany}\textbackslash ref}:\\[2pt]
  \hspace*{-6pt}\begin{tikzpicture}
    \node[matrix, column sep=3pt, row sep=8pt] {
      \node{
        \begin{minipage}[t][10mm][c]{.28\textwidth}
          \begin{itemize}
            \item Gleichungen, Sections, Figures und vieles mehr!
          \end{itemize}
        \end{minipage}
      }; &
      \node[draw=blue!20!lightgray, line width=2pt]{
        \begin{minipage}[t][26mm][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][26mm][c]{.25\textwidth}
          \input{examples/4a.tex}
        \end{minipage}
      };
      \\
      \node{
        \begin{minipage}[t][10mm][c]{.28\textwidth}
          \begin{itemize}
631
            \item \highlightRed{\bsl ref} darf auch vor dem
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
              \highlightRed{\bsl label} stehen
          \end{itemize}
        \end{minipage}
      }; &
      \node[draw=blue!20!lightgray, line width=2pt]{
        \begin{minipage}[t][26mm][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][26mm][c]{.25\textwidth}
              \includegraphics[width=\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4b_fake.png}
        \end{minipage}
      };
      \\
    };
  \end{tikzpicture}
Lennart Klebl's avatar
Lennart Klebl committed
650
651
\end{frame}

652
653
\begin{frame}[fragile]{Verschiedenes}
  \structure{Fußnoten:}
Lennart Klebl's avatar
Lennart Klebl committed
654
  \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
655
656
    \item Einfügen mit \highlightRed{\bsl footnote}\verb+{Fußnotentext}+
      irgendwo:
Lennart Klebl's avatar
Lennart Klebl committed
657
  \end{itemize}
658
  \begin{center}
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
    \vspace{-8pt}
    \begin{tikzpicture}
    \node[matrix, column sep=4pt, row sep=0pt] {
      \node[draw=blue!20!lightgray, line width=2pt]{
        \begin{minipage}[t][24mm][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][24mm][c]{.3\textwidth}
        \includegraphics[width=1\textwidth,trim=0cm 0cm 0cm 0cm, clip]{examples/4c_fake.png}
        \end{minipage}
      };
      \\
Lennart Klebl's avatar
Lennart Klebl committed
674
    };
675
676
    \end{tikzpicture}
    \vspace{-8pt}
677
  \end{center}
678
679
  \structure{URLs:}
  \highlightRed{\textbackslash url}\verb+{http://fsmpi.eu/latex}+ \\[2pt]
680
681
  \structure{Besondere Zeichen}
  \begin{itemize}
682
683
684
685
686
687
688
    \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
689
      %todo besser sortieren, noch was vergessen?
690
  \end{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
691
692
\end{frame}

Valentin Bruch's avatar
Valentin Bruch committed
693
\section{Präambel}
Lennart Klebl's avatar
Lennart Klebl committed
694
695
\begin{frame}[fragile]{Präambel}
  \begin{columns}
696
    \begin{column}{0.45\textwidth}
Lennart Klebl's avatar
Lennart Klebl committed
697
      \structure{Die \glqq{Präambel}\grqq} wird benutzt für \\[3pt]
Lennart Klebl's avatar
Lennart Klebl committed
698
      \begin{itemize}
Lennart Klebl's avatar
Lennart Klebl committed
699
700
701
702
703
704
        \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
705
        \item \highlightRed{\textbackslash{}begin}\verb+{document}+ \\
706
          \hspace{1em}Inhalt\\
Lennart Klebl's avatar
Lennart Klebl committed
707
          \highlightRed{\textbackslash{}end}\verb+{document}+
Lennart Klebl's avatar
Lennart Klebl committed
708
      \end{itemize}
709
      \vspace{12pt}
Lennart Klebl's avatar
Lennart Klebl committed
710
    \end{column}
Lennart Klebl's avatar
Lennart Klebl committed
711
    \hspace{10pt}
Lennart Klebl's avatar
Lennart Klebl committed
712
    \begin{column}{0.05\textwidth}
Lennart Klebl's avatar
präsi    
Lennart Klebl committed
713
      {\only<1>{\color{RoyalBlue}}\only<2>{\color{Green}}\rule{0.5pt}{0.8\textheight}}
Lennart Klebl's avatar
Lennart Klebl committed
714
    \end{column}
715
716
    \begin{column}{0.45\textwidth}
      \vspace*{-20pt}
Lennart Klebl's avatar
Lennart Klebl committed
717
      \only<1>{\lstinputlisting[basicstyle=\tiny\ttfamily]{examples/preamble.tex}}
718
      \only<2>{\includegraphics[width=\textwidth]{examples/preamble.pdf}\vspace{-10pt}}
Lennart Klebl's avatar
Lennart Klebl committed
719
    \end{column}
Lennart Klebl's avatar
Lennart Klebl committed
720
    \hspace{-10pt}
Lennart Klebl's avatar
Lennart Klebl committed
721
  \end{columns}
Lennart Klebl's avatar
Lennart Klebl committed
722
723
\end{frame}

724
\end{document}
Lennart Klebl's avatar
Lennart Klebl committed
725
726

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