/
slides-basics.tex
214 lines (181 loc) · 6.06 KB
/
slides-basics.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
\documentclass[xcolor=table]{beamer}
\input{style}
\usepackage{multicol}
\newcommand{\authorstring}{Johannes Thorn}
\newcommand{\shortauthorstring}{\textcolor{authorjonny}{Johannes}}
% author colors are updated in macros.tex
\newcommand{\titlestring}{\LaTeX}
\newcommand{\shorttitlestring}{\LaTeX}
\newcommand{\datestring}{SWK HL 9}
\begin{document}
\mode
<article>
\input{titlepage}
\dominitoc
\markboth{Inhaltsverzeichnis}{}
\tableofcontents
\mode
<all>
\jonny
\label{chapter-grundlagen}
\part{Grundlagen}
\title{\LaTeX\\Grundlagen}
\begin{frame}[plain]
\begin{center}
\textbf{\fontsize{36pt}{36pt}\selectfont\rmfamily\color{maincolor}\LaTeX}\\
\vskip2ex
\textbf{\fontsize{24pt}{24pt}\selectfont\rmfamily\color{maincolor}Grundlagen}
\par\vskip2ex
\large Johannes Thorn\\
Softwerkskammer Lübeck Nr.~9
\end{center}
\end{frame}
\section*{\targetscontentname}
\frame[plain]{\frametitle{\targetsname}%
\begin{enumerate}
\item \LaTeX\ kennen lernen.
\item Aufbau von \LaTeX-Dokumenten, -Befehlen und -Umgebungen kennen.
\item \LaTeX\ verwenden können.
\item Verstehen, wofür man \LaTeX\ einsetzen kann und wofür nicht.
\end{enumerate}}
\begin{frame}[plain]{\outlinename}
\begin{columns}[t]
\begin{column}{.5\textwidth}
\tableofcontents[sections={1-3}]
\end{column}
\begin{column}{.5\textwidth}
\tableofcontents[sections={4-8}]
\end{column}
\end{columns}
\end{frame}
\website
\input{basics-latex}
\input{basics-usage}
\input{basics-elements}
\beamersection{Ausblick}
\subsection{Quelltext}
\begin{Frame}[fragile]{Quelltext}
\begin{Block}{In der Präambel}
\begin{lstlisting}[style=block,gobble=6]
\usepackage{listings}
\lstset{%
basicstyle=\ttfamily,%
showstringspaces=false,%
upquote=true}
\usepackage{textcomp} % für upquote
\usepackage{courier} % für schönere Schriftart
\end{lstlisting}
\end{Block}
\end{Frame}
\begin{Frame}{Quelltext}{Am Beispiel von Java-Code}
\lstinputlisting{listing.tex}
\xxx
\lstset{backgroundcolor={},frame=no,aboveskip=0pt,%
belowskip=0pt,keywordstyle=\bfseries,literate={}}
\input{listing.tex}
\end{Frame}
\subsection{Literatur}
\begin{Frame}[fragile]{Was ist \BibTeX?}
\begin{itemize}
\item \BibTeX\ ist ein \alert{eigenständiges Programm},\\
das \LaTeX\ ergänzt.
\item \BibTeX\ erzeugt aus einer \alert{Literaturdatenbank}\\
ein \alert{Literaturverzeichnis}.
\item Das Literaturverzeichnis enthält \alert{nur} die\\
mit \lstinline-\cite- \alert{zitierten Einträge} der Datenbank.
\end{itemize}
\end{Frame}
\begin{Frame}[t]{Ein Beispieldokument \texttt{arbeit.pdf}}
\includegraphics[width=9cm]{demo/arbeit.pdf}
\end{Frame}
\subsection{\TikZ}
\begin{Frame}{Was ist \TikZ?}
\begin{itemize}
\item \TikZ\ ist kein Zeichenprogramm,\\
dient aber zum Zeichnen von Grafiken mit \LaTeX.
\item \TikZ\ wird entwickelt und gepflegt von Till Tantau.
\item \TikZ\ ist ein Makropaket für \TeX\ bzw. \LaTeX.
\item \TikZ\ verfügt über die beste Anleitung aller Zeiten.
\end{itemize}
\end{Frame}
\begin{Frame}{Ein erstes Beispiel}{Trigonometrische Funktionen mit \TikZ}
\tikzexample{[scale=3.5]
% Gitter im Hintergrund
\draw[step=.5cm,gray,very thin] (0,0)
grid (1.4,1.4);
% Kreisbogen
\draw (1,0) arc (0:90:1cm);
% Koordinatenachsen
\draw[->] (0,0) -- (1.5,0) node[right] {$x$};
\draw[->] (0,0) -- (0,1.5) node[above] {$y$};
% Winkel
\filldraw[fill=green!20,draw=green!50!black]
(0,0) -- (3mm,0pt) arc (0:30:3mm);
\draw (15:2mm) node[green!50!black] {$\alpha$};
% Sinus und Kosinus
\draw[very thick,red]
(30:1cm) -- node[left]
{$\sin \alpha$} (30:1cm |- 0,0);
\draw[very thick,blue]
(0,0) -- node[below]
{$\cos \alpha$} (30:1cm |- 0,0);
% Schnittpunktberechnung und Tangens
\path [name path=upward line]
(1,0) -- (1,1);
\path [name path=sloped line]
(0,0) -- (30:1.5cm);
\draw [name intersections=
{of=upward line and sloped line, by=tan}]
[very thick,orange] (1,0) -- node [right]
{$\displaystyle \tan \alpha \color{black}=
\frac{{\color{red}\sin \alpha}}
{\color{blue}\cos \alpha}$} (tan);
\draw (0,0) -- (tan);
}
\end{Frame}
\begin{Frame}{Ein zweites Beispiel}{GGT mit \TikZ}
\tikzexample{
[io/.style={trapezium, trapezium left angle=70, trapezium right angle=110, fill=magenta!10, draw=magenta},
op/.style={rectangle, fill=orange!10, draw=orange},
cn/.style={diamond, aspect=2, inner sep=2pt, fill=red!10, draw=red},
node distance=5mm, thick]
\node[io] (in) {Eingabe $a,b$};
\node[op, below=of in] (div) {$r=a \mod b$};
\node[op, below=of div] (set) {$a=b,\ b=r$};
\node[cn, below=of set] (cond) {$b=0?$};
\node[io, below=of cond] (out) {Ausgabe $a$};
%
\path[->]
(in) edge (div)
(div) edge (set)
(set) edge (cond)
(cond) edge node[right] {Ja} (out);
\draw[->] (cond) -- node[below] {Nein} ++(1.5,0) |- (div);
}
\end{Frame}
\subsection{BEAMER}
\begin{Frame}{Was ist \beamer?}
\begin{itemize}
\item \alert{Dokumentenklasse für \LaTeX} für die Erzeugung von Präsentationen.
\only<article>{\newline(Diese Präsentation und das Skript wurden mit \beamer\ erzeugt.)}
\item Keine eigene und \alert{keine graphische Anwendung}.
\item \strut\beamer\ ist in \MiKTeX\ und \TeX\ Live enthalten.\newline
(\alert{Es kann direkt losgehen}.)
\end{itemize}
\end{Frame}
\begin{Frame}{Funktionsweise von \beamer}
\begin{itemize}
\item Kompilieren wie jedes andere \LaTeX-Dokument auch.
\item Normale \LaTeX-Kommandos funktionieren.
\item Sinnvolles funktionales Aussehen von Vorträgen.
\item Einfaches Ein- und Ausblenden von Seitenteilen.
\item Automatische Gliederungen und Navigationsleisten.
\item Präsentationen im PDF-Format können auf jedem Computer dargestellt werden.
\item Erzeugung von Präsentation und Skriptfassung aus dem gleichen \LaTeX-Dokument.
\end{itemize}
\end{Frame}
\mode
<all>
\input{basics-summary}
\againframe<2>[plain]{basics-summary}
\end{document}