updated handouts
authorChristian Urban <christian dot urban at kcl dot ac dot uk>
Sun, 01 Dec 2013 10:17:17 +0000
changeset 217 cd6066f1056a
parent 216 f5ec7c597c5b
child 218 8f3f8d82da8b
updated handouts
handouts/ho01.pdf
handouts/ho01.tex
handouts/ho02.pdf
handouts/ho02.tex
handouts/ho03.pdf
handouts/ho03.tex
handouts/ho05.pdf
handouts/ho05.tex
handouts/ho06.pdf
handouts/ho06.tex
Binary file handouts/ho01.pdf has changed
--- a/handouts/ho01.tex	Sun Dec 01 10:08:53 2013 +0000
+++ b/handouts/ho01.tex	Sun Dec 01 10:17:17 2013 +0000
@@ -1,50 +1,13 @@
 \documentclass{article}
-\usepackage{charter}
 \usepackage{hyperref}
 \usepackage{amssymb}
 \usepackage{amsmath}
 \usepackage[T1]{fontenc}
-\usepackage{listings}
-\usepackage{xcolor}
+\usepackage{../langs}
 
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
 
-\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
 
-\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]"""
-}
-
-\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}
-	
 \begin{document}
 
 \section*{Handout 1}
Binary file handouts/ho02.pdf has changed
--- a/handouts/ho02.tex	Sun Dec 01 10:08:53 2013 +0000
+++ b/handouts/ho02.tex	Sun Dec 01 10:17:17 2013 +0000
@@ -1,50 +1,13 @@
 \documentclass{article}
-\usepackage{charter}
 \usepackage{hyperref}
 \usepackage{amssymb}
 \usepackage{amsmath}
 \usepackage[T1]{fontenc}
-\usepackage{listings}
-\usepackage{xcolor}
+\usepackage{../langs}
 
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
 
-\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
 
-\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]"""
-}
-
-\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}
-	
 \begin{document}
 
 \section*{Handout 2}
Binary file handouts/ho03.pdf has changed
--- a/handouts/ho03.tex	Sun Dec 01 10:08:53 2013 +0000
+++ b/handouts/ho03.tex	Sun Dec 01 10:17:17 2013 +0000
@@ -1,5 +1,4 @@
 \documentclass{article}
-\usepackage{charter}
 \usepackage{hyperref}
 \usepackage{amssymb}
 \usepackage{amsmath}
@@ -15,45 +14,11 @@
 \usetikzlibrary{calc}
 \usetikzlibrary{fit}
 \usetikzlibrary{backgrounds}
+\usepackage{../langs}
 
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
 
-\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
 
-\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]"""
-}
-
-\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}
-	
 \begin{document}
 
 \section*{Handout 3}
Binary file handouts/ho05.pdf has changed
--- a/handouts/ho05.tex	Sun Dec 01 10:08:53 2013 +0000
+++ b/handouts/ho05.tex	Sun Dec 01 10:17:17 2013 +0000
@@ -1,11 +1,8 @@
 \documentclass{article}
-\usepackage{charter}
 \usepackage{hyperref}
 \usepackage{amssymb}
 \usepackage{amsmath}
 \usepackage[T1]{fontenc}
-\usepackage{listings}
-\usepackage{xcolor}
 \usepackage{tikz}
 \usetikzlibrary{arrows}
 \usetikzlibrary{automata}
@@ -15,58 +12,10 @@
 \usetikzlibrary{calc}
 \usetikzlibrary{fit}
 \usetikzlibrary{backgrounds}
-\usepackage{fontspec}
-\setmonofont{Consolas}
+\usepackage{../langs}
 
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
 
-\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
-  
-\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}
 	
 \newcommand\grid[1]{%
 \begin{tikzpicture}[baseline=(char.base)]
Binary file handouts/ho06.pdf has changed
--- a/handouts/ho06.tex	Sun Dec 01 10:08:53 2013 +0000
+++ b/handouts/ho06.tex	Sun Dec 01 10:17:17 2013 +0000
@@ -1,11 +1,8 @@
 \documentclass{article}
-\usepackage{charter}
 \usepackage{hyperref}
 \usepackage{amssymb}
 \usepackage{amsmath}
 \usepackage[T1]{fontenc}
-\usepackage{listings}
-\usepackage{xcolor}
 \usepackage{tikz}
 \usetikzlibrary{arrows}
 \usetikzlibrary{automata}
@@ -15,58 +12,10 @@
 \usetikzlibrary{calc}
 \usetikzlibrary{fit}
 \usetikzlibrary{backgrounds}
-\usepackage{fontspec}
-\setmonofont{Consolas}
+\usepackage{../langs}
+
 
 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
-
-\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
-
-\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}
 	
 \newcommand\grid[1]{%
 \begin{tikzpicture}[baseline=(char.base)]