handouts/ho05.tex
changeset 151 df229ec49b22
child 152 90e27fafc5c7
equal deleted inserted replaced
150:a2d792ed768e 151:df229ec49b22
       
     1 \documentclass{article}
       
     2 \usepackage{charter}
       
     3 \usepackage{hyperref}
       
     4 \usepackage{amssymb}
       
     5 \usepackage{amsmath}
       
     6 \usepackage[T1]{fontenc}
       
     7 \usepackage{listings}
       
     8 \usepackage{xcolor}
       
     9 \usepackage{tikz}
       
    10 \usetikzlibrary{arrows}
       
    11 \usetikzlibrary{automata}
       
    12 \usetikzlibrary{shapes}
       
    13 \usetikzlibrary{shadows}
       
    14 \usetikzlibrary{positioning}
       
    15 \usetikzlibrary{calc}
       
    16 \usetikzlibrary{fit}
       
    17 \usetikzlibrary{backgrounds}
       
    18 
       
    19 \newcommand{\dn}{\stackrel{\mbox{\scriptsize def}}{=}}%
       
    20 
       
    21 \definecolor{javared}{rgb}{0.6,0,0} % for strings
       
    22 \definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments
       
    23 \definecolor{javapurple}{rgb}{0.5,0,0.35} % keywords
       
    24 \definecolor{javadocblue}{rgb}{0.25,0.35,0.75} % javadoc
       
    25 
       
    26 \lstdefinelanguage{scala}{
       
    27   morekeywords={abstract,case,catch,class,def,%
       
    28     do,else,extends,false,final,finally,%
       
    29     for,if,implicit,import,match,mixin,%
       
    30     new,null,object,override,package,%
       
    31     private,protected,requires,return,sealed,%
       
    32     super,this,throw,trait,true,try,%
       
    33     type,val,var,while,with,yield},
       
    34   otherkeywords={=>,<-,<\%,<:,>:,\#,@},
       
    35   sensitive=true,
       
    36   morecomment=[l]{//},
       
    37   morecomment=[n]{/*}{*/},
       
    38   morestring=[b]",
       
    39   morestring=[b]',
       
    40   morestring=[b]"""
       
    41 }
       
    42 
       
    43 \lstset{language=Scala,
       
    44 	basicstyle=\ttfamily,
       
    45 	keywordstyle=\color{javapurple}\bfseries,
       
    46 	stringstyle=\color{javagreen},
       
    47 	commentstyle=\color{javagreen},
       
    48 	morecomment=[s][\color{javadocblue}]{/**}{*/},
       
    49 	numbers=left,
       
    50 	numberstyle=\tiny\color{black},
       
    51 	stepnumber=1,
       
    52 	numbersep=10pt,
       
    53 	tabsize=2,
       
    54 	showspaces=false,
       
    55 	showstringspaces=false}
       
    56 	
       
    57 \begin{document}
       
    58 
       
    59 \section*{Handout 5}
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 \end{document}
       
    65 
       
    66 %%% Local Variables: 
       
    67 %%% mode: latex
       
    68 %%% TeX-master: t
       
    69 %%% End: