slides/slides06.tex
changeset 215 828303e8e4af
parent 184 2e9134d25a2b
child 295 19f23c4c2167
--- a/slides/slides06.tex	Sat Nov 30 00:06:02 2013 +0000
+++ b/slides/slides06.tex	Sun Dec 01 09:58:41 2013 +0000
@@ -1,8 +1,5 @@
 \documentclass[dvipsnames,14pt,t]{beamer}
 \usepackage{beamerthemeplaincu}
-%\usepackage[T1]{fontenc}
-%\usepackage[latin1]{inputenc}
-\usepackage{mathpartir}
 \usepackage[absolute,overlay]{textpos}
 \usepackage{ifthen}
 \usepackage{tikz}
@@ -20,12 +17,9 @@
 \usetikzlibrary{calc}
 \usetikzlibrary{plotmarks}
 \usepackage{graphicx} 
-\setmonofont{Consolas}
+\usepackage{../langs}
+\usepackage{../data}
 
-\definecolor{javared}{rgb}{0.6,0,0} % for strings
-\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
-\definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
-\definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
 
 \makeatletter
 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
@@ -33,101 +27,11 @@
 \makeatother
 
 
-\lstdefinelanguage{scala}{
-  morekeywords={abstract,case,catch,class,def,%
-    do,else,extends,false,final,finally,%
-    for,if,implicit,import,match,mixin,%
-    new,null,object,override,package,%
-    private,protected,requires,return,sealed,%
-    super,this,throw,trait,true,try,%
-    type,val,var,while,with,yield},
-  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
-  sensitive=true,
-  morecomment=[l]{//},
-  morecomment=[n]{/*}{*/},
-  morestring=[b]",
-  morestring=[b]',
-  morestring=[b]"""
-}
-
-\lstdefinelanguage{while}{
-  morekeywords={while, if, then. else, read, write},
-  otherkeywords={=>,<-,<\%,<:,>:,\#,@},
-  sensitive=true,
-  morecomment=[l]{//},
-  morecomment=[n]{/*}{*/},
-  morestring=[b]",
-  morestring=[b]',
-  morestring=[b]"""
-}
-
-
-\lstset{language=Scala,
-	basicstyle=\ttfamily,
-	keywordstyle=\color{javapurple}\bfseries,
-	stringstyle=\color{javagreen},
-	commentstyle=\color{javagreen},
-	morecomment=[s][\color{javadocblue}]{/**}{*/},
-	numbers=left,
-	numberstyle=\tiny\color{black},
-	stepnumber=1,
-	numbersep=10pt,
-	tabsize=2,
-	showspaces=false,
-	showstringspaces=false}
-	
-
 % beamer stuff 
 \renewcommand{\slidecaption}{AFL 06, King's College London, 30.~October 2013}
 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
 
-
-\begin{filecontents}{s-grammar1.data}
-1 0.01152
-51 0.07973
-101 0.09726
-151 0.09320
-201 0.10010
-251 0.16997
-301 0.26662
-351 0.46118
-401 0.62516
-451 0.87247
-501 1.16334
-551 1.71152
-601 2.10958
-651 2.44360
-701 2.98488
-751 3.50326
-801 4.11036
-851 4.93394
-901 5.77465
-951 7.39123
-\end{filecontents}
-
-\begin{filecontents}{s-grammar2.data}
-1 0.01280
-2 0.00064
-3 0.00173
-4 0.00355
-5 0.00965
-6 0.02674
-7 0.06953
-8 0.11166
-9 0.18707
-10 0.09189
-11 0.12724
-12 0.24337
-13 0.59304
-14 1.53594
-15 4.01195
-16 10.73582
-17 29.51587
-#18 73.14163
-\end{filecontents}
-
-
 \begin{document}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%