From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Allan Webber Subject: Re: Nice python listings colors, or solution to beamer + minted brokenness? Date: Sun, 13 Feb 2011 23:24:43 -0600 Message-ID: <8762sn89yc.fsf@dustycloud.org> References: <87aahz8nd6.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=46372 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PoqvP-00038x-8E for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 00:24:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PoqvN-0001Zs-9d for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 00:24:39 -0500 Received: from li28-75.members.linode.com ([75.127.72.75]:45851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PoqvN-0001Zd-4W for emacs-orgmode@gnu.org; Mon, 14 Feb 2011 00:24:37 -0500 In-Reply-To: (Chris Malone's message of "Sun, 13 Feb 2011 21:11:47 -0500") 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: Chris Malone Cc: emacs-orgmode@gnu.org Hi Chris, That'll work well enough for now I think. Thanks much for the response! Chris Malone writes: > Also, it's not an elegant or automated solution, but check out Section > 2.8: Emphasize Identifiers in the listings manual.? You could > basically add something like > > emph=3D{ReferenceDeskPanel}, emphstyle=3D\color{blue} > > to your =3Dlstset=3D to get that particular class to have a blue font.? > You could add such a line for /every/ class you have by putting in the > optional argument as described in the manual.? I don't > know how one could do this for every word that follows the Python > =3Dclass=3D directive, as the =3Dlstset=3D /key-value/ setup doesn't allo= w for > such things... > > HTH, > > Chris > > On Sun, Feb 13, 2011 at 8:46 PM, Chris Malone = wrote: > > Hi Chris, >=20=20=20=20 > I doubt this will fix the problem (it is more of a curiosity), but wh= y in your =3Dlstset=3D do you have the language as "\Python" instead of "Py= thon"? >=20=20=20=20 > Chris > > On Sun, Feb 13, 2011 at 7:35 PM, Christopher Allan Webber wrote: >=20=20=20=20 > Hello all, >=20=20=20=20=20=20=20=20 > 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 > > -- > ??????????? ????? ?????? > > _______________________________________________ > 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 > --=20 =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