Hi

On Fri, Jan 29, 2010 at 9:50 PM, Noufal Ibrahim <nou...@gmail.com> wrote:
> On Fri, Jan 29, 2010 at 9:19 PM, JAGANADH G <jagana...@gmail.com> wrote:
>> Dear All
>>
>> Can somebody give me a clear example how to highlight Python code in latex
>> beamer.
>> I used listings but no result .

Something like this should work.

Put something like this in the preamble
\usepackage{color}
\usepackage{listings}
\lstset{language=Python,
    basicstyle=\ttfamily\bfseries,
    commentstyle=\color{red}\itshape,
  stringstyle=\color{darkgreen},
  showstringspaces=false,
  keywordstyle=\color{blue}\bfseries}

Use the following to display code.
\begin{lstlisting}
>>> print "Hello, World!"
\end{lstlisting}

Look at listings' manual for more info.

--
~punchagan
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to