From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Nice python listings colors, or solution to beamer + minted brokenness? Date: Mon, 14 Feb 2011 11:07:25 +0000 Message-ID: References: <87aahz8nd6.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=41983 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PowHG-00076K-LR for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 06:07:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PowHF-0007Uy-Gg for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 06:07:34 -0500 Received: from mail-wy0-f169.google.com ([74.125.82.169]:57109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PowHF-0007Us-1j for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 06:07:33 -0500 Received: by wyj26 with SMTP id 26so4737310wyj.0 for ; Mon, 14 Feb 2011 03:07:32 -0800 (PST) In-Reply-To: <87aahz8nd6.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 13 Feb 2011 18:35:01 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Christopher Allan Webber Cc: emacs-orgmode@gnu.org Christopher Allan Webber writes: > Hello all, > > I currently am trying to export something vaguely like this for a > presentation in beamer: > > #+BEGIN_SRC python :exports code > class ReferenceDeskPanel(bpy.types.Panel): > bl_label = 'Reference Desk' > bl_space_type = 'VIEW_3D' > bl_region_type = 'TOOLS' > > def draw(self, context): > layout = self.layout > > row = layout.row() > row.prop( > context.scene, 'refdesk_search', > text="", icon='VIEWZOOM') > > search_string = context.scene.get('refdesk_search') > #+END_SRC > > I've tried using listings with: > > #+begin_LaTeX > \definecolor{keywords}{RGB}{255,0,90} > \definecolor{comments}{RGB}{60,179,113} > > \lstset{ > language=\Python, > keywordstyle=\color{keywords}, > commentstyle=\color{comments}emph, > procnamestyle=\color{blue}\textbf, > emphstyle=\color{black}\bfseries, > } > #+end_LaTeX > > in my document but I can't figure out how to get the class name > (ReferenceDeskPanel) to be highlighted in any form. I've read through > the listings manual but I can't find any reference on how to do this. > > I also tried using minted, but I'm running into the problem discussed in > this thread: > > http://article.gmane.org/gmane.emacs.orgmode/32147/match=minted Hi Christopher, I believe I have just fixed the problem with minted and beamer. Please pull latex org from git and restart emacs, or (setq org-beamer-fragile-re "^[ \t]*\\\\begin{\\(verbatim\\|lstlisting\\|minted\\)}") Personally I think that minted will be preferable to listings for your application. Dan > > I'm at wit's end... I just want to figure out how to syntax highlight my > whole python snippet! Any examples of good color sets in listings to > use would be *greatly* appreciated! Or a solution to that minted + > beamer problem! Either one! > > Super, ultra thanks in advance, > - cwebb