diff -r e28d7a327870 -r 4fee50f38305 langs.sty --- a/langs.sty Sun May 07 03:01:29 2017 +0100 +++ b/langs.sty Tue May 09 12:31:55 2017 +0100 @@ -39,27 +39,6 @@ otherkeywords={=,!=,:=,<,>,\%;*,/}, }[keywords,comments,strings] -\lstdefinestyle{mystyle} - {basicstyle=\ttfamily, - keywordstyle=\color{codepurple}\bfseries, - stringstyle=\color{codegreen}, - commentstyle=\color{codegreen}, - morecomment=[s][\color{codedocblue}]{/**}{*/}, - numbers=left, - numberstyle=\tiny\color{black}, - stepnumber=1, - numbersep=10pt, - tabsize=2, - showspaces=false, - showstringspaces=false, - xleftmargin=8mm, - emphstyle=\color{codeblue}\bfseries, - keepspaces -} - -\lstset{language=Scala, - style=mystyle} - \newcommand{\code}[1]{{\lstinline{#1}}} \newcommand{\pcode}[1]{\mbox{\lstset{language={},keywordstyle=\color{black}}\lstinline!#1!}} @@ -69,8 +48,29 @@ %%\lstset{escapeinside={(*@}{@*)}} \lstset{escapeinside={/*@}{@*/}} - - %% stripy code \usepackage{lstlinebgrd} \definecolor{capri}{rgb}{0.0, 0.75, 1.0} + + +\lstdefinestyle{mystyle} + {basicstyle=\ttfamily, + keywordstyle=\color{codepurple}\bfseries, + stringstyle=\color{codegreen}, + commentstyle=\color{codegreen}, + morecomment=[s][\color{codedocblue}]{/**}{*/}, + numbers=none, + numberstyle=\tiny\color{black}, + stepnumber=1, + numbersep=10pt, + tabsize=2, + showspaces=false, + showstringspaces=false, + xleftmargin=8mm, + emphstyle=\color{codeblue}\bfseries, + keepspaces, + linebackgroundcolor={\ifodd\value{lstnumber}\color{capri!3}\fi} +} + +\lstset{language=Scala, + style=mystyle}