langs.sty
changeset 238 527fdb90fffe
parent 237 370c0647a9bf
child 239 68d98140b90b
equal deleted inserted replaced
237:370c0647a9bf 238:527fdb90fffe
     1 \usepackage{listings}
     1 \usepackage{listings}
       
     2 \usepackage{etoolbox}
     2 \setmonofont[Scale=.95]{Consolas}
     3 \setmonofont[Scale=.95]{Consolas}
     3 \newfontfamily{\consolas}{Consolas}
     4 \newfontfamily{\consolas}{Consolas}
     4 
     5 
     5 \definecolor{codered}{rgb}{0.6,0,0}            % for strings
     6 \definecolor{codered}{rgb}{0.6,0,0}            % for strings
     6 \definecolor{codegreen}{rgb}{0.25,0.5,0.35}    % comments
     7 \definecolor{codegreen}{rgb}{0.25,0.5,0.35}    % comments
     7 \definecolor{codepurple}{rgb}{0.5,0,0.35}      % keywords
     8 \definecolor{codepurple}{rgb}{0.5,0,0.35}      % keywords
     8 \definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc
     9 \definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc
     9 \definecolor{codeblue}{rgb}{0.25,0.35,0.75}    % types
    10 \definecolor{codeblue}{rgb}{0.25,0.35,0.75}    % types
    10 
    11 
    11 
    12 \BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
       
    13 \AfterEndEnvironment{lstlisting}{\end{minipage}\par}
    12 
    14 
    13 \lstdefinelanguage{Scala}{
    15 \lstdefinelanguage{Scala}{
    14   morekeywords={abstract,case,catch,class,def,%
    16   morekeywords={abstract,case,catch,class,def,%
    15     do,else,extends,false,final,finally,%
    17     do,else,extends,false,final,finally,%
    16     for,if,implicit,import,match,mixin,%
    18     for,if,implicit,import,match,mixin,%