langs.sty
changeset 164 08a6e035223e
parent 160 4cbd6ca025e6
child 336 3cb200fa6d6a
equal deleted inserted replaced
163:02026ee18378 164:08a6e035223e
     6 \definecolor{codered}{rgb}{0.6,0,0}            % for strings
     6 \definecolor{codered}{rgb}{0.6,0,0}            % for strings
     7 \definecolor{codegreen}{rgb}{0.25,0.5,0.35}    % comments
     7 \definecolor{codegreen}{rgb}{0.25,0.5,0.35}    % comments
     8 \definecolor{codepurple}{rgb}{0.5,0,0.35}      % keywords
     8 \definecolor{codepurple}{rgb}{0.5,0,0.35}      % keywords
     9 \definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc
     9 \definecolor{codedocblue}{rgb}{0.25,0.35,0.75} % doc
    10 \definecolor{codeblue}{rgb}{0.25,0.35,0.75}    % types
    10 \definecolor{codeblue}{rgb}{0.25,0.35,0.75}    % types
       
    11 \definecolor{darkgray}{rgb}{.4,.4,.4}
    11 
    12 
    12 \BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
    13 \BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}}
    13 \AfterEndEnvironment{lstlisting}{\end{minipage}\par}
    14 \AfterEndEnvironment{lstlisting}{\end{minipage}\par}
       
    15 
       
    16 \lstdefinelanguage{JavaScript}{
       
    17   keywords={break,case,catch,continue,debugger,default,% 
       
    18     delete,do,else,false,finally,for,function,if,in,instanceof,% 
       
    19     new,null,return,switch,this,throw,true,try,typeof,var,void,while,with},
       
    20   morecomment=[l]{//},
       
    21   morecomment=[s]{/*}{*/},
       
    22   morestring=[b]',
       
    23   morestring=[b]",
       
    24   ndkeywords={class,export,boolean,throw,implements,import,this},
       
    25   keywordstyle=\color{codepurple}\bfseries,
       
    26   ndkeywordstyle=\color{darkgray}\bfseries,
       
    27   identifierstyle=\color{black},
       
    28   commentstyle=\color{codegreen}\ttfamily,
       
    29   stringstyle=\color{codegreen}\ttfamily,
       
    30   sensitive=true
       
    31 }
    14 
    32 
    15 \lstdefinelanguage{Scala}{
    33 \lstdefinelanguage{Scala}{
    16   morekeywords={abstract,case,catch,class,def,%
    34   morekeywords={abstract,case,catch,class,def,%
    17     do,else,extends,false,final,finally,%
    35     do,else,extends,false,final,finally,%
    18     for,if,implicit,import,match,mixin,%
    36     for,if,implicit,import,match,mixin,%