% http://tex.stackexchange.com/questions/34896/coloring-digits-with-the-listings-package
\makeatletter
\newcommand{\ProcessDigit}[1]
{%
  \ifnum\lst@mode=\lst@Pmode\relax%
   {\digitstyle #1}%
  \else
    #1%
  \fi
}
\makeatother
\lstset{literate=%
    {0}{{{\ProcessDigit{0}}}}1
    {1}{{{\ProcessDigit{1}}}}1
    {2}{{{\ProcessDigit{2}}}}1
    {3}{{{\ProcessDigit{3}}}}1
    {4}{{{\ProcessDigit{4}}}}1
    {5}{{{\ProcessDigit{5}}}}1
    {6}{{{\ProcessDigit{6}}}}1
    {7}{{{\ProcessDigit{7}}}}1
    {8}{{{\ProcessDigit{8}}}}1
    {9}{{{\ProcessDigit{9}}}}1
    {<=}{{\(\leq\)}}1,
    morestring=[b]",
    morestring=[b]',
    morecomment=[l]//,
}

\lstset{
%   language=Python,
  showstringspaces=false,
  basicstyle=\ttfamily\small,
  commentstyle=\itshape\color{OliveGreen},
  keywordstyle=\bfseries, % needs different \ttdefault
  stringstyle=\color{Dandelion}, % Green Goldenrod
  identifierstyle=\color{black},
  emph=[1]{self},
  emphstyle=[1]{\color{Emerald}},
}

\definecolor{poster-dark-blue}{HTML}{2222AA}
\newcommand\digitstyle{\color{poster-dark-blue}}
