From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Malone Subject: Re: Nice python listings colors, or solution to beamer + minted brokenness? Date: Sun, 13 Feb 2011 20:46:00 -0500 Message-ID: References: <87aahz8nd6.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1470550378==" Return-path: Received: from [140.186.70.92] (port=47178 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PonVt-0005Eb-8F for emacs-orgmode@gnu.org; Sun, 13 Feb 2011 20:46:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PonVr-0007UQ-Sq for emacs-orgmode@gnu.org; Sun, 13 Feb 2011 20:46:05 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:44673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PonVr-0007UJ-KQ for emacs-orgmode@gnu.org; Sun, 13 Feb 2011 20:46:03 -0500 Received: by iyi20 with SMTP id 20so4779520iyi.0 for ; Sun, 13 Feb 2011 17:46:02 -0800 (PST) In-Reply-To: <87aahz8nd6.fsf@dustycloud.org> 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 --===============1470550378== Content-Type: multipart/alternative; boundary=00221532cba8c049d6049c3435f1 --00221532cba8c049d6049c3435f1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Chris, I doubt this will fix the problem (it is more of a curiosity), but why in your =3Dlstset=3D do you have the language as "\Python" instead of "Python"= ? Chris On Sun, Feb 13, 2011 at 7:35 PM, Christopher Allan Webber < cwebber@dustycloud.org> wrote: > 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 =3D 'Reference Desk' > bl_space_type =3D 'VIEW_3D' > bl_region_type =3D 'TOOLS' > > def draw(self, context): > layout =3D self.layout > > row =3D layout.row() > row.prop( > context.scene, 'refdesk_search', > text=3D"", icon=3D'VIEWZOOM') > > search_string =3D 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=3D\Python, > keywordstyle=3D\color{keywords}, > commentstyle=3D\color{comments}emph, > procnamestyle=3D\color{blue}\textbf, > emphstyle=3D\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=3Dminted > > 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 > > -- > =F0=9D=93=92=F0=9D=93=B1=F0=9D=93=BB=F0=9D=93=B2=F0=9D=93=BC=F0=9D=93=BD= =F0=9D=93=B8=F0=9D=93=B9=F0=9D=93=B1=F0=9D=93=AE=F0=9D=93=BB =F0=9D=93=90= =F0=9D=93=B5=F0=9D=93=B5=F0=9D=93=AA=F0=9D=93=B7 =F0=9D=93=A6=F0=9D=93=AE= =F0=9D=93=AB=F0=9D=93=AB=F0=9D=93=AE=F0=9D=93=BB > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --00221532cba8c049d6049c3435f1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Chris,

I doubt this will fix the problem (it is more of a cur= iosity), but why in your =3Dlstset=3D do you have the language as "\Py= thon" instead of "Python"?

Chris


On Sun, Feb 13, 2011 at 7:35 PM, Christopher Allan Webber <cwebber@dustycloud.org&g= t; wrote:
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):
=C2=A0 =C2=A0bl_label =3D 'Reference Desk'
=C2=A0 =C2=A0bl_space_type =3D 'VIEW_3D'
=C2=A0 =C2=A0bl_region_type =3D 'TOOLS'

=C2=A0 =C2=A0def draw(self, context):
=C2=A0 =C2=A0 =C2=A0 =C2=A0layout =3D self.layout

=C2=A0 =C2=A0 =C2=A0 =C2=A0row =3D layout.row()
=C2=A0 =C2=A0 =C2=A0 =C2=A0row.prop(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0context.scene, 'refdesk_searc= h',
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0text=3D"", icon=3D'= VIEWZOOM')

=C2=A0 =C2=A0 =C2=A0 =C2=A0search_string =3D context.scene.get('refdes= k_search')
#+END_SRC

I've tried using listings with:

#+begin_LaTeX
=C2=A0\definecolor{keywords}{RGB}{255,0,90}
=C2=A0\definecolor{comments}{RGB}{60,179,113}

=C2=A0\lstset{
=C2=A0 =C2=A0language=3D\Python,
=C2=A0 =C2=A0keywordstyle=3D\color{keywords},
=C2=A0 =C2=A0commentstyle=3D\color{comments}emph,
=C2=A0 =C2=A0procnamestyle=3D\color{blue}\textbf,
=C2=A0 =C2=A0emphstyle=3D\color{black}\bfseries,
=C2=A0 =C2=A0}
#+end_LaTeX

in my document but I can't figure out how to get the class name
(ReferenceDeskPanel) to be highlighted in any form. =C2=A0I've read thr= ough
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 i= n
this thread:

http://article.gmane.org/gmane.emacs.orgmode/32147/mat= ch=3Dminted

I'm at wit's end... I just want to figure out how to syntax highlig= ht my
whole python snippet! =C2=A0Any examples of good color sets in listings to<= br> use would be *greatly* appreciated! =C2=A0Or a solution to that minted + beamer problem! =C2=A0Either one!

Super, ultra thanks in advance,
=C2=A0- cwebb

--
=F0=9D=93=92=F0=9D=93=B1=F0=9D=93=BB=F0=9D=93=B2=F0=9D=93=BC=F0=9D=93=BD=F0= =9D=93=B8=F0=9D=93=B9=F0=9D=93=B1=F0=9D=93=AE=F0=9D=93=BB =F0=9D=93=90=F0= =9D=93=B5=F0=9D=93=B5=F0=9D=93=AA=F0=9D=93=B7 =F0=9D=93=A6=F0=9D=93=AE=F0= =9D=93=AB=F0=9D=93=AB=F0=9D=93=AE=F0=9D=93=BB

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--00221532cba8c049d6049c3435f1-- --===============1470550378== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1470550378==--