From db8a9e29cce63cfbc1043bb790914a36a6b0b820 Mon Sep 17 00:00:00 2001
From: Stefan Heimersheim <stefan.heimersheim@rwth-aachen.de>
Date: Mon, 20 May 2019 19:51:36 +0200
Subject: [PATCH] lstlisting und marginbox

---
 workshops/latex/latex.tex | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/workshops/latex/latex.tex b/workshops/latex/latex.tex
index f17324d..ed734df 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,11 +37,10 @@
   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!
-  \newlength\marginwidth
   \setlength\marginwidth{#1}
   \begin{tikzpicture}[even odd rule, scale=1]
     \node[anchor=north west] (text) {%
@@ -135,7 +145,7 @@
 			\marginbox{\textwidth}{\lstinputlisting{examples/2a_umbruch.tex}}
 		\end{column}
 		\begin{column}{0.35\textwidth}
-			\input{examples/2a_umbruch.tex}
+			\marginbox{\textwidth}{\input{examples/2a_umbruch.tex}}
 		\end{column}
 	\end{columns}
 
@@ -149,7 +159,7 @@
 			\marginbox{\textwidth}{\lstinputlisting{examples/2b_umbruch.tex}}
 		\end{column}
 		\begin{column}{0.35\textwidth}
-			\input{examples/2b_umbruch.tex}
+			\marginbox{\textwidth}{\input{examples/2b_umbruch.tex}}
 		\end{column}
 	\end{columns}
 
@@ -163,7 +173,7 @@
 			\marginbox{\textwidth}{\lstinputlisting{examples/2c_umbruch.tex}}
 		\end{column}
 		\begin{column}{0.35\textwidth}
-			\input{examples/2c_umbruch.tex}
+			\marginbox{\textwidth}{\input{examples/2c_umbruch.tex}}
 		\end{column}
 	\end{columns}
 
-- 
GitLab