latex.tex 5.54 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
24
25
26
27
28
\lstset{
	basicstyle=\scriptsize\ttfamily,
	language={[LaTeX]TeX},
	texcsstyle=*\color{Mahogany}\bfseries,
	commentstyle=\itshape\color{RoyalBlue},
	keywordstyle=\color{RoyalBlue}\bfseries,
	moretexcs={lstset,testfont,color,sl,lstinputlisting,newfontfamily,fontsize,HUGE,
		Gargantous,ShowCharInBox},
	morekeywords={center,document}
}

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

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
\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}
75
76
77
78
79
\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
80
      {\LaTeX} übersetzt\\
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
      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}{%
97
            \lstinputlisting[language=tex, basicstyle=\small\ttfamily]{examples/minimal.tex}
98
99
100
101
102
103
104
105
106
107
        }};
      \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
108
            \hspace{.1\textwidth}Hallo Welt!
109
110
111
112
113
114
        }};
      \end{tikzpicture}
    \end{column}
  \end{columns}
\end{frame}

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

Stefan Heimersheim's avatar
Stefan Heimersheim committed
123
\begin{frame}[fragile]{Beispielfolie}{Auf dieser Folie sollte eine super Motivation stehen!}
124
125
126
127
128
129
130
131
132
133
134
\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
135
136
137

\begin{frame}[fragile]{Zeilenumbrüche}
	\structure{Neue Zeile:}
138
139
140
	\begin{columns}
		\begin{column}{0.3\textwidth}
			\begin{itemize}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
141
				\item Zeilen im \texttt{.tex} ignoriert
142
143
144
			\end{itemize}
		\end{column}
		\begin{column}{0.35\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
145
			\marginbox{\textwidth}{\lstinputlisting{examples/2a_umbruch.tex}}
146
147
		\end{column}
		\begin{column}{0.35\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
148
			\marginbox{\textwidth}{\input{examples/2a_umbruch.tex}}
149
150
		\end{column}
	\end{columns}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
151
152
153
154
155
156
157
158
159
160
161

	\begin{columns}
		\begin{column}{0.3\textwidth}
			\begin{itemize}
				\item Absatz: Leere Zeile
			\end{itemize}
		\end{column}
		\begin{column}{0.35\textwidth}
			\marginbox{\textwidth}{\lstinputlisting{examples/2b_umbruch.tex}}
		\end{column}
		\begin{column}{0.35\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
162
			\marginbox{\textwidth}{\input{examples/2b_umbruch.tex}}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
163
164
165
166
167
168
169
170
171
172
173
174
175
		\end{column}
	\end{columns}

	\begin{columns}
		\begin{column}{0.3\textwidth}
			\begin{itemize}
				\item Manueller Zeilenumbruch
			\end{itemize}
		\end{column}
		\begin{column}{0.35\textwidth}
			\marginbox{\textwidth}{\lstinputlisting{examples/2c_umbruch.tex}}
		\end{column}
		\begin{column}{0.35\textwidth}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
176
			\marginbox{\textwidth}{\input{examples/2c_umbruch.tex}}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
177
178
179
		\end{column}
	\end{columns}

Stefan Heimersheim's avatar
Stefan Heimersheim committed
180
	\structure{Neue Seite:}
Stefan Heimersheim's avatar
Stefan Heimersheim committed
181
182
183
184
185
186
187
188
189
190
191
192
193
194
	\begin{columns}
		\begin{column}{0.3\textwidth}
			\begin{itemize}
				\item Manueller Seitenumbruch
			\end{itemize}
		\end{column}
		\begin{column}{0.35\textwidth}
			\marginbox{\textwidth}{\lstinputlisting{examples/2d_umbruch.tex}}
		\end{column}
		\begin{column}{0.35\textwidth}
			Foto
		\end{column}
	\end{columns}

195
196
197
\end{frame}

\end{document}