19 \usetikzlibrary{positioning} |
16 \usetikzlibrary{positioning} |
20 \usetikzlibrary{calc} |
17 \usetikzlibrary{calc} |
21 \usetikzlibrary{plotmarks} |
18 \usetikzlibrary{plotmarks} |
22 \usepackage{graphicx} |
19 \usepackage{graphicx} |
23 \usepackage{pgfplots} |
20 \usepackage{pgfplots} |
24 \setmonofont{Consolas} |
21 \usepackage{../langs} |
25 |
22 \usepackage{../data} |
26 \definecolor{javared}{rgb}{0.6,0,0} % for strings |
23 |
27 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments |
|
28 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords |
|
29 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc |
|
30 |
|
31 \lstset{language=Java, |
|
32 basicstyle=\ttfamily, |
|
33 keywordstyle=\color{javapurple}\bfseries, |
|
34 stringstyle=\color{javagreen}, |
|
35 commentstyle=\color{javagreen}, |
|
36 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
37 numbers=left, |
|
38 numberstyle=\tiny\color{black}, |
|
39 stepnumber=1, |
|
40 numbersep=10pt, |
|
41 tabsize=2, |
|
42 showspaces=false, |
|
43 showstringspaces=false} |
|
44 |
|
45 \lstdefinelanguage{scala}{ |
|
46 morekeywords={abstract,case,catch,class,def,% |
|
47 do,else,extends,false,final,finally,% |
|
48 for,if,implicit,import,match,mixin,% |
|
49 new,null,object,override,package,% |
|
50 private,protected,requires,return,sealed,% |
|
51 super,this,throw,trait,true,try,% |
|
52 type,val,var,while,with,yield}, |
|
53 otherkeywords={=>,<-,<\%,<:,>:,\#,@}, |
|
54 sensitive=true, |
|
55 morecomment=[l]{//}, |
|
56 morecomment=[n]{/*}{*/}, |
|
57 morestring=[b]", |
|
58 morestring=[b]', |
|
59 morestring=[b]""" |
|
60 } |
|
61 |
|
62 |
|
63 \lstset{language=Scala, |
|
64 basicstyle=\ttfamily, |
|
65 keywordstyle=\color{javapurple}\bfseries, |
|
66 stringstyle=\color{javagreen}, |
|
67 commentstyle=\color{javagreen}, |
|
68 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
69 numbers=left, |
|
70 numberstyle=\tiny\color{black}, |
|
71 stepnumber=1, |
|
72 numbersep=10pt, |
|
73 tabsize=2, |
|
74 showspaces=false, |
|
75 showstringspaces=false} |
|
76 |
|
77 \lstdefinelanguage{while}{ |
|
78 morekeywords={if,then,else,while,do,true,false,write}, |
|
79 otherkeywords={=,!=,:=,<,>,;}, |
|
80 sensitive=true, |
|
81 morecomment=[n]{/*}{*/}, |
|
82 } |
|
83 |
|
84 |
|
85 \lstset{language=While, |
|
86 basicstyle=\ttfamily, |
|
87 keywordstyle=\color{javapurple}\bfseries, |
|
88 stringstyle=\color{javagreen}, |
|
89 commentstyle=\color{javagreen}, |
|
90 morecomment=[s][\color{javadocblue}]{/**}{*/}, |
|
91 numbers=left, |
|
92 numberstyle=\tiny\color{black}, |
|
93 stepnumber=1, |
|
94 numbersep=10pt, |
|
95 tabsize=2, |
|
96 showspaces=false, |
|
97 showstringspaces=false} |
|
98 |
|
99 |
24 |
100 % beamer stuff |
25 % beamer stuff |
101 \renewcommand{\slidecaption}{AFL 09, King's College London, 27.~November 2013} |
26 \renewcommand{\slidecaption}{AFL 09, King's College London, 27.~November 2013} |
102 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
27 \newcommand{\bl}[1]{\textcolor{blue}{#1}} |
103 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |
28 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions |