latex.tex 9.41 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/}}
15
16
17

\usetheme{OSAK}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
18
19
20
21
22
23
\lstset{
	basicstyle=\scriptsize\ttfamily,
	language={[LaTeX]TeX},
	texcsstyle=*\color{Mahogany}\bfseries,
	commentstyle=\itshape\color{RoyalBlue},
	keywordstyle=\color{RoyalBlue}\bfseries,
24
	moretexcs={lstset,testfont,testfont,subsubsection,paragraph,subsection ,color,sl,textcolor,lstinputlisting,newfontfamily,fontsize,HUGE,
Stefan Heimersheim's avatar
Stefan Heimersheim committed
25
26
27
28
		Gargantous,ShowCharInBox},
	morekeywords={center,document}
}

29
30
31
32
\makeatletter
\newcommand\notsotiny{\@setfontsize\notsotiny{7}{8}}
\makeatother

33
34
35
36
37
38
39
40
41
42
43
% 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
44
\newlength\marginwidth
Valentin Bruch's avatar
Valentin Bruch committed
45
\newcommand\marginbox[3][2pt]{
Valentin Bruch's avatar
Valentin Bruch committed
46
47
48
  % 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
49
50
  \begin{tikzpicture}[even odd rule, scale=1]
    \node[anchor=north west] (text) {%
Valentin Bruch's avatar
Valentin Bruch committed
51
52
      \begin{minipage}{#2-2\marginwidth-10pt}%
        #3%
Valentin Bruch's avatar
Valentin Bruch committed
53
54
55
56
57
58
59
60
      \end{minipage}%
    };
    \begin{pgfonlayer}{background}
      \node[draw opacity=.5, draw=blue, line width=#1, inner sep=2pt, fit = (text)] {};
    \end{pgfonlayer}
  \end{tikzpicture}
}

61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
\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}

\begin{frame}{Inhaltsverzeichnis}
  \tableofcontents
\end{frame}

\section{Motivation}
\section{Dokumente mit \LaTeX}
\subsection{\TeX{}studio als Editor}
79
80
81
82
83
\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
84
      {\LaTeX} übersetzt\\
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
      Text in ein PDF
      \begin{itemize}
        \item Formatierung durch\\Befehle im Text
        \item Automatische Formatierung
      \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}{%
101
            \lstinputlisting[language=tex, basicstyle=\small\ttfamily]{examples/minimal.tex}
102
103
104
105
106
107
108
109
110
111
        }};
      \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}{%
Valentin Bruch's avatar
Valentin Bruch committed
112
            \hspace{.1\textwidth}Hallo Welt!
113
114
115
116
117
118
        }};
      \end{tikzpicture}
    \end{column}
  \end{columns}
\end{frame}

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

Stefan Heimersheim's avatar
Stefan Heimersheim committed
127
\begin{frame}[fragile]{Beispielfolie}{Auf dieser Folie sollte eine super Motivation stehen!}
128
129
130
131
132
133
134
135
136
137
138
\structure{Ein bisschen sinnloser Inhalt:}
\begin{itemize}
  \item Hier kein Satz!
  \item Generell: niemals Sätze!
\end{itemize}
\begin{enumerate}
  \item Bilder sind auch toll
  \item Das Logo da unten kann man mit \verb~\OSAKthemenologo~ ausblenden\dots
\end{enumerate}
\end{frame}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
139
140

\begin{frame}[fragile]{Zeilenumbrüche}
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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
  \structure{Neue Zeile:}
  \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}
                \item Absatz: Leere Zeile
            \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 Manueller Zeilenumbruch
            \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}

  \structure{Neue Seite:}
  \begin{tikzpicture}
      \node[matrix, column sep=4pt, row sep=6pt] {
        \node{
          \begin{minipage}[t][10mm][c]{.28\textwidth}
            \begin{itemize}
                \item Manueller Seitenumbruch
            \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
228

229
230
\end{frame}

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
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321

\begin{frame}[fragile]{Zeilenumbrüche}
\structure{Formatierung:}
%TODO Mehrere von diesen structures?
\begin{tikzpicture}
\node[matrix, column sep=4pt, row sep=6pt] {
	\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}
	};
	\\
	\node{
		\begin{minipage}[t][10mm][c]{.28\textwidth}
		\begin{itemize}
		\item Überschriften (automatisch)
		\end{itemize}
		\end{minipage}
	}; &
	\node[draw=blue!20!lightgray, line width=2pt]{
		\begin{minipage}[t][10mm][c]{.3\textwidth}
		\lstinputlisting[basicstyle=\notsotiny\ttfamily]{examples/2h.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}

\end{frame}

322
\end{document}