Following code cant highlight as keyword. What am I doing wrong? Shouldn't as be bold like import?
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\lstset{morekeywords={as}}
\title{Python listings}
\author{me}
\begin{document}
\maketitle
\section{Introduction}
Python example
\begin{lstlisting}[language=Python]
#!/usr/bin/env python
"""
An animated image
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
\end{lstlisting}
done with the example.
\end{document}

\lstset{otherkeywords={as}}seems to work. From the documentation it appears thatotherkeywordsis intended to be used for keywords that may contain other characters or begin with numbers, so perhaps it is a bug thatmorekeywordsdid not work. – Peter Grill Sep 24 '12 at 16:52otherkeywordsworks. I didn't find a valid reason (in listings documentation) tomorekeywordsignore 'as', thus it seems it's a bug. Where can I report it? e-mail to the maintainer? – sivic Sep 24 '12 at 18:25