VL2: Restructure files, make the latex code more modular

Also added a few more section to make beamer and article more
compatible.
This commit is contained in:
Julian Ospald 2015-04-20 18:06:58 +02:00
parent 5b8cc0de65
commit e9374aed1f
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
22 changed files with 133 additions and 422 deletions

View File

@ -1,307 +1,21 @@
\documentclass[10pt,a5paper,mathserif,serif,usenames,dvipsnames]{beamer}
\documentclass[10pt,a5paper,mathserif,serif,usenames,dvipsnames,handout]{beamer}
% packages
\usepackage{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{minted}
% for \verb inside \item
\usepackage[T1]{fontenc}
\usepackage[Q=yes]{examplep}
% package configuration
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\beamertemplatenavigationsymbolsempty
\setbeamertemplate{footline}[frame number]
\usemintedstyle{friendly}
\newminted{haskell}{frame=single,numbers=left}
\newminted{cpp}{frame=single,numbers=left}
\newminted{c}{frame=single,numbers=left}
\renewcommand{\theFancyVerbLine}{\ttfamily
\textcolor[rgb]{0.0,0.0,0.0}{\footnotesize
\oldstylenums{\arabic{FancyVerbLine}}}}
\input{../common/beamer_configuration.tex}
% title page information
\author{Julian Ospald}
\institute{FH Bielefeld}
\title{Haskell: higher order functions}
% color definition
\definecolor{solarized}{HTML}{002B36}
\definecolor{mygreen}{rgb}{0,0.6,0}
% macros and environments
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\slidep}{\onslide<+->}
\newenvironment{itemizep}
{\begin{itemize}[<+->]}
{\end{itemize}}
\begin{document}
\frame{\titlepage}
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\tableofcontents[hidesubsections=true]
\end{frame}
\section{1. Reiteration}
\begin{frame}
\frametitle{1. Reiteration}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\begin{frame}
\frametitle{1. Reiteration (cnt.)}
\input{./content/VL2_reiteration.tex}
\end{frame}
\section{2. Polymorphism}
\begin{frame}
\frametitle{2. Polymorphism}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\begin{frame}[fragile]
\frametitle{2. Polymorphism (cnt.)}
\input{./content/VL2_polymorphism1.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{2. Polymorphism (cnt.)}
\input{./content/VL2_polymorphism2.tex}
\end{frame}
\section{3. More ways to define functions}
\begin{frame}
\frametitle{3. More ways to define functions}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\begin{frame}[fragile]
\frametitle{3. More ways to define functions (cnt.)}
\input{./content/VL2_define_functions1.tex}
\end{frame}
\subsection{3.1. Where}
\begin{frame}[fragile]
\frametitle{3.1. Where}
\input{./content/VL2_define_functions2.tex}
\end{frame}
\subsection{3.2. Let}
\begin{frame}[fragile]
\frametitle{3.2. Let}
\input{./content/VL2_define_functions3.tex}
\end{frame}
\subsection{3.3. Let vs Where}
\begin{frame}[fragile]
\frametitle{3.3. Let vs Where}
\input{./content/VL2_define_functions4.tex}
\end{frame}
\subsection{3.4. Anonymous functions}
\begin{frame}[fragile]
\frametitle{3.4. Anonymous functions}
\input{./content/VL2_define_functions5.tex}
\end{frame}
\section{4. Currying}
\begin{frame}
\frametitle{4. Currying}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying1.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying2.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying3.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying4.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying5.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying6.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying7.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{4. Currying (cnt.)}
\input{./content/VL2_currying8.tex}
\end{frame}
\section{5. Function composition}
\begin{frame}
\frametitle{5. Function composition}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\begin{frame}[fragile]
\frametitle{5. Function composition (cnt.)}
\input{./content/VL2_composition1.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{5. Function composition}
\input{./content/VL2_composition2.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{5. Function composition}
\input{./content/VL2_composition3.tex}
\end{frame}
\section{6. Recursion patterns}
\begin{frame}
\frametitle{6. Recursion patterns}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\begin{frame}[fragile]
\frametitle{6. Recursion patterns (cnt.)}
\input{./content/VL2_rec_patterns1.tex}
\end{frame}
\subsection{6.1. Map}
\begin{frame}[fragile]
\frametitle{6.1. Map}
\input{./content/VL2_rec_patterns2.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.1. Map (cnt.)}
\input{./content/VL2_rec_patterns3.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.1. Map (cnt.)}
\input{./content/VL2_rec_patterns4.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.1. Map (cnt.)}
\input{./content/VL2_rec_patterns5.tex}
\end{frame}
\subsection{6.2. Filter}
\begin{frame}[fragile]
\frametitle{6.2. Filter}
\input{./content/VL2_rec_patterns6.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.2. Filter (cnt.)}
\input{./content/VL2_rec_patterns7.tex}
\end{frame}
\subsection{6.3. Fold}
\begin{frame}[fragile]
\frametitle{6.3. Fold}
\input{./content/VL2_rec_patterns8.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.3. Fold (cnt.)}
\input{./content/VL2_rec_patterns9.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.3. Fold (cnt.)}
\input{./content/VL2_rec_patterns10.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.3. Fold (cnt.)}
\input{./content/VL2_rec_patterns11.tex}
\end{frame}
\begin{frame}[fragile]
\frametitle{6.3. Summary}
\input{./content/VL2_rec_patterns12.tex}
\end{frame}
\section{7. Reflection}
\begin{frame}
\frametitle{7. Reflection}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\subsection{7.1. What you should know}
\begin{frame}
\frametitle{7.1. What you should know now}
\input{./content/VL2_reflection1.tex}
\end{frame}
\subsection{7.2. Questions for you}
\begin{frame}[fragile]
\frametitle{7.2. Questions for you}
\input{./content/VL2_reflection2.tex}
\end{frame}
\section{8. References}
\begin{frame}
\frametitle{8. References}
\tableofcontents[currentsection,hideothersubsections]
\end{frame}
\subsection{8.1. Links}
\begin{frame}
\frametitle{8.1. Further reading and useful links}
\input{../common/content/VL_links.tex}
\end{frame}
\subsection{8.2. Sources}
\begin{frame}
\frametitle{8.2. Sources}
\input{../common/content/VL_sources.tex}
\end{frame}
\input{./VL2_document_structure.tex}
\end{document}

View File

@ -0,0 +1,127 @@
\section{Reiteration}
\slidetoc
\slide{./content/VL2_reiteration.tex}
\section{Polymorphism}
\slidetoc
\slide{./content/VL2_polymorphism1.tex}
\slide{./content/VL2_polymorphism2.tex}[ (cnt.)]
\section{More ways to define functions}
\slidetoc
\slide{./content/VL2_more_ways_to_define_functions.tex}
\subsection{Where}
\slide{./content/VL2_where.tex}
\subsection{Let}
\slide{./content/VL2_let.tex}
\subsection{Let vs Where}
\slide{./content/VL2_let_vs_where.tex}
\subsection{Anonymous functions}
\slide{./content/VL2_anonymous_functions.tex}
\section{Currying}
\slidetoc
\slide{./content/VL2_currying1.tex}
\subsection{Definition}
\slide{./content/VL2_currying2.tex}
\subsection{Mathematical example}
\slide{./content/VL2_currying3.tex}
\subsection{Geometrical example}
\slide{./content/VL2_currying4.tex}
\subsection{Conclusion}
\slide{./content/VL2_currying5.tex}
\subsection{Partial application}
\slide{./content/VL2_currying6.tex}[ (cnt.)]
\subsection{Curry and Uncurry}
\slide{./content/VL2_currying7.tex}[ (cnt.)]
\subsection{Summary}
\slide{./content/VL2_currying8.tex}[ (cnt.)]
\section{Function composition}
\slidetoc
\slide{./content/VL2_composition1.tex}
\slide{./content/VL2_composition2.tex}[ (cnt.)]
\slide{./content/VL2_composition3.tex}[ (cnt.)]
\section{Recursion patterns}
\slidetoc
\slide{./content/VL2_rec_patterns.tex}
\subsection{Map}
\slide{./content/VL2_map1.tex}
\slide{./content/VL2_map2.tex}[ (cnt.)]
\slide{./content/VL2_map3.tex}[ (cnt.)]
\slide{./content/VL2_map4.tex}[ (cnt.)]
\subsection{Filter}
\slide{./content/VL2_filter1.tex}
\slide{./content/VL2_filter2.tex}[ (cnt.)]
\subsection{Fold}
\slide{./content/VL2_fold1.tex}
\slide{./content/VL2_fold2.tex}[ (cnt.)]
\slide{./content/VL2_fold3.tex}[ (cnt.)]
\slide{./content/VL2_fold4.tex}[ (cnt.)]
\slide{./content/VL2_fold5.tex}[ (cnt.)]
\section{Reflection}
\slidetoc
\subsection{What you should know}
\slide{./content/VL2_what_you_should_know.tex}
\subsection{Questions for you}
\slide{./content/VL2_questions_for_you.tex}
\section{References}
\slidetoc
\subsection{Links}
\slide{../common/content/VL_links.tex}
\subsection{Sources}
\slide{../common/content/VL_sources.tex}

View File

@ -1,42 +1,6 @@
\documentclass[12pt,a4paper,fleqn,oneside]{article}
% packages
\usepackage{xcolor}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{minted}
% for \verb inside \item
\usepackage[T1]{fontenc}
\usepackage[Q=yes]{examplep}
% package configuration
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\usemintedstyle{friendly}
\newminted{haskell}{frame=single,numbers=left,samepage=true}
\newminted{cpp}{frame=single,numbers=left}
\newminted{c}{frame=single,numbers=left}
\renewcommand{\theFancyVerbLine}{\ttfamily
\textcolor[rgb]{0.0,0.0,0.0}{\footnotesize
\oldstylenums{\arabic{FancyVerbLine}}}}
% macros and environments
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\pause}{}
\newcommand{\slidep}{}
\newenvironment{itemizep}
{\begin{itemize}}
{\end{itemize}}
% color definition
\definecolor{solarized}{HTML}{002B36}
\definecolor{mygreen}{rgb}{0,0.6,0}
\input{../common/article_configuration.tex}
\begin{document}
@ -48,100 +12,6 @@
\tableofcontents
\section{Reiteration}
\input{./content/VL2_reiteration.tex}
\section{Polymorphism}
\input{./content/VL2_polymorphism1.tex}
\input{./content/VL2_polymorphism2.tex}
\input{./content/VL2_polymorphism3.tex}
\section{More ways to define functions}
\input{./content/VL2_define_functions1.tex}
\subsection{Where}
\input{./content/VL2_define_functions2.tex}
\subsection{Let}
\input{./content/VL2_define_functions3.tex}
\subsection{Let vs Where}
\input{./content/VL2_define_functions4.tex}
\subsection{Anonymous functions}
\input{./content/VL2_define_functions5.tex}
\section{Currying}
\input{./content/VL2_currying1.tex}
\\\\
\input{./content/VL2_currying2.tex}
\\\\
\input{./content/VL2_currying3.tex}
\\\\
\input{./content/VL2_currying4.tex}
\\\\
\input{./content/VL2_currying5.tex}
\\\\
\input{./content/VL2_currying6.tex}
\input{./content/VL2_currying7.tex}
\input{./content/VL2_currying8.tex}
\section{Function composition}
\input{./content/VL2_composition1.tex}
\input{./content/VL2_composition2.tex}
\input{./content/VL2_composition3.tex}
\section{Recursion patterns}
\input{./content/VL2_rec_patterns1.tex}
\subsection{Map}
\input{./content/VL2_rec_patterns2.tex}
\input{./content/VL2_rec_patterns3.tex}
\\\\
\input{./content/VL2_rec_patterns4.tex}
\\\\
\input{./content/VL2_rec_patterns5.tex}
\subsection{Filter}
\input{./content/VL2_rec_patterns6.tex}
\\\\
\input{./content/VL2_rec_patterns7.tex}
\subsection{Fold}
\input{./content/VL2_rec_patterns8.tex}
\input{./content/VL2_rec_patterns9.tex}
\\\\
\input{./content/VL2_rec_patterns10.tex}
\input{./content/VL2_rec_patterns11.tex}
\subsection{Summary}
\input{./content/VL2_rec_patterns12.tex}
\section{Reflection}
\subsection{What you should know}
\input{./content/VL2_reflection1.tex}
\subsection{Questions for you}
\input{./content/VL2_reflection2.tex}
\section{References}
\subsection{Links}
\input{../common/content/VL_links.tex}
\subsection{Sources}
\input{../common/content/VL_sources.tex}
\input{./VL2_document_structure.tex}
\end{document}