diff --git a/workshops/latex/examples/2a_umbruch.tex b/workshops/latex/examples/2a_umbruch.tex index 058dfbd491eb52a621dba52c39df6e333414768d..28729c204e8173681b08e717f05d666d084c3087 100644 --- a/workshops/latex/examples/2a_umbruch.tex +++ b/workshops/latex/examples/2a_umbruch.tex @@ -1,5 +1,2 @@ -\documentclass[preview]{standalone} -\begin{document} Zeile 1. -Zeile 2. -\end{document} +Zeile 2. \ No newline at end of file diff --git a/workshops/latex/examples/2b_umbruch.tex b/workshops/latex/examples/2b_umbruch.tex index 08adcab07db55d5e3fa07b4f753e40804dad70f3..fe83b00a95aecaf80f482fd04708c069e2464bb5 100644 --- a/workshops/latex/examples/2b_umbruch.tex +++ b/workshops/latex/examples/2b_umbruch.tex @@ -1,6 +1,3 @@ -\documentclass[preview]{standalone} -\begin{document} Zeile 1. -Zeile 2. -\end{document} +Zeile 2. \ No newline at end of file diff --git a/workshops/latex/examples/2c_umbruch.tex b/workshops/latex/examples/2c_umbruch.tex index c17aabaff29c198c45846c014c3067f8c2b51c2f..ab457040532767b73775452754b5d9c23e4526e4 100644 --- a/workshops/latex/examples/2c_umbruch.tex +++ b/workshops/latex/examples/2c_umbruch.tex @@ -1,4 +1 @@ -\documentclass[preview]{standalone} -\begin{document} -Zeile 1. \\ Zeile 2. -\end{document} +Zeile 1. \\ Zeile 2. \ No newline at end of file diff --git a/workshops/latex/examples/2d_umbruch.tex b/workshops/latex/examples/2d_umbruch.tex new file mode 100644 index 0000000000000000000000000000000000000000..4eec680ce15470506971d2b1d383f64d1ff0834c --- /dev/null +++ b/workshops/latex/examples/2d_umbruch.tex @@ -0,0 +1,3 @@ +Seite 1 +\newpage +Seite 2 diff --git a/workshops/latex/latex.tex b/workshops/latex/latex.tex index 42e83ebc157f0bcfc7e884fe80a18d512bca9efe..a4e3ce32510d1be5475618e9531f50e193477d58 100644 --- a/workshops/latex/latex.tex +++ b/workshops/latex/latex.tex @@ -1,4 +1,4 @@ -\documentclass[]{beamer} +\documentclass[xcolor=dvipsnames]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} @@ -15,6 +15,17 @@ \usetheme{OSAK} +\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} +} + % TODO Titel & Autoren anpassen! \date{\today} \title[\LaTeX-Workshop]{\LaTeX ist toll!} @@ -26,12 +37,15 @@ und der Aachener Linux User Group } - +\newlength\marginwidth \newcommand\marginbox[3][2pt]{ + % USAGE: \marginbox[margin width]{width}{content} + % TODO: width is set manually such that it fits real width! + \setlength\marginwidth{#1} \begin{tikzpicture}[even odd rule, scale=1] \node[anchor=north west] (text) {% - \begin{minipage}{#1}% - #2% + \begin{minipage}{#2-2\marginwidth-10pt}% + #3% \end{minipage}% }; \begin{pgfonlayer}{background} @@ -120,43 +134,94 @@ \begin{frame}[fragile]{Zeilenumbrüche} - \structure{Neue Zeile:} - \begin{columns} - \begin{column}{0.3\textwidth} - \begin{itemize} - \item Zeilen ignoriert - \end{itemize} - \end{column} - \begin{column}{0.35\textwidth} - \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,-2pt) - rectangle (\textwidth-2pt, -.5\textwidth+2pt); - \node[anchor=north west] at (4pt, -12pt) {\begin{minipage}[t][.5\textwidth-12pt][t]{\textwidth-12pt} - \centering - \begin{verbatim} - Zeile 1. - Zeile 2. - \end{verbatim} - \end{minipage} - }; - \end{tikzpicture} - \end{column} - \begin{column}{0.35\textwidth} - Zeile 1. - Zeile 2. - \end{column} - \end{columns} - \begin{itemize} - %todo Listing Makro, schoene boxen und so - \item Leere Zeile $\rightarrow$ \includegraphics[]{2b_umbruch.pdf} - \item Manueller Zeilenumbruch: \includegraphics[]{2c_umbruch.pdf} - \end{itemize} - \structure{Neue Seite:} -% \begin{verbatim} -% \newpage -% \end{verbatim} + \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} + \end{frame} \end{document}