slides/slides03.tex
changeset 215 828303e8e4af
parent 143 e3fd4c5995ef
child 265 332fbe9c91ab
equal deleted inserted replaced
214:5be68de225e9 215:828303e8e4af
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     1 \documentclass[dvipsnames,14pt,t]{beamer}
     2 \usepackage{beamerthemeplaincu}
     2 \usepackage{beamerthemeplaincu}
     3 %%\usepackage[T1]{fontenc}
       
     4 \usepackage[latin1]{inputenc}
       
     5 \usepackage{mathpartir}
       
     6 \usepackage[absolute,overlay]{textpos}
     3 \usepackage[absolute,overlay]{textpos}
     7 \usepackage{ifthen}
     4 \usepackage{ifthen}
     8 \usepackage{tikz}
     5 \usepackage{tikz}
     9 \usepackage{pgf}
     6 \usepackage{pgf}
    10 \usepackage{calc} 
     7 \usepackage{calc} 
    19 \usetikzlibrary{positioning}
    16 \usetikzlibrary{positioning}
    20 \usetikzlibrary{calc}
    17 \usetikzlibrary{calc}
    21 \usetikzlibrary{fit}
    18 \usetikzlibrary{fit}
    22 \usetikzlibrary{backgrounds}
    19 \usetikzlibrary{backgrounds}
    23 \usepackage{graphicx} 
    20 \usepackage{graphicx} 
    24 
    21 \usepackage{../langs}
    25 \definecolor{javared}{rgb}{0.6,0,0} % for strings
    22 \usepackage{../data}
    26 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
    23 
    27 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
       
    28 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
       
    29 \makeatletter
    24 \makeatletter
    30 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
    25 \lst@CCPutMacro\lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{-{}}}
    31 \@empty\z@\@empty
    26 \@empty\z@\@empty
    32 \makeatother
    27 \makeatother
    33 
       
    34 \lstset{language=Java,
       
    35 	basicstyle=\consolas,
       
    36 	keywordstyle=\color{javapurple}\bfseries,
       
    37 	stringstyle=\color{javagreen},
       
    38 	commentstyle=\color{javagreen},
       
    39 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    40 	numbers=left,
       
    41 	numberstyle=\tiny\color{black},
       
    42 	stepnumber=1,
       
    43 	numbersep=10pt,
       
    44 	tabsize=2,
       
    45 	showspaces=false,
       
    46 	showstringspaces=false}
       
    47 
       
    48 \lstdefinelanguage{scala}{
       
    49   morekeywords={abstract,case,catch,class,def,%
       
    50     do,else,extends,false,final,finally,%
       
    51     for,if,implicit,import,match,mixin,%
       
    52     new,null,object,override,package,%
       
    53     private,protected,requires,return,sealed,%
       
    54     super,this,throw,trait,true,try,%
       
    55     type,val,var,while,with,yield},
       
    56   otherkeywords={=>,<-,<\%,<:,>:,\#,@,->},
       
    57   sensitive=true,
       
    58   morecomment=[l]{//},
       
    59   morecomment=[n]{/*}{*/},
       
    60   morestring=[b]",
       
    61   morestring=[b]',
       
    62   morestring=[b]"""
       
    63 }
       
    64 
       
    65 \lstset{language=Scala,
       
    66 	basicstyle=\consolas,
       
    67 	keywordstyle=\color{javapurple}\bfseries,
       
    68 	stringstyle=\color{javagreen},
       
    69 	commentstyle=\color{javagreen},
       
    70 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    71 	numbers=left,
       
    72 	numberstyle=\tiny\color{black},
       
    73 	stepnumber=1,
       
    74 	numbersep=10pt,
       
    75 	tabsize=2,
       
    76 	showspaces=false,
       
    77 	showstringspaces=false}
       
    78 
       
    79 
    28 
    80 % beamer stuff 
    29 % beamer stuff 
    81 \renewcommand{\slidecaption}{AFL 03, King's College London, 9.~October 2013}
    30 \renewcommand{\slidecaption}{AFL 03, King's College London, 9.~October 2013}
    82 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
    31 \newcommand{\bl}[1]{\textcolor{blue}{#1}}       
    83 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions
    32 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}% for definitions