all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Davison <dandavison7@gmail.com>
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Nice python listings colors, or solution to beamer + minted brokenness?
Date: Mon, 14 Feb 2011 11:07:25 +0000	[thread overview]
Message-ID: <m1y65inac2.fsf@94.196.56.147.threembb.co.uk> (raw)
In-Reply-To: <87aahz8nd6.fsf@dustycloud.org> (Christopher Allan Webber's message of "Sun, 13 Feb 2011 18:35:01 -0600")

Christopher Allan Webber <cwebber@dustycloud.org> 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

  parent reply	other threads:[~2011-02-14 11:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14  0:35 Nice python listings colors, or solution to beamer + minted brokenness? Christopher Allan Webber
2011-02-14  1:46 ` Chris Malone
2011-02-14  2:11   ` Chris Malone
2011-02-14  5:24     ` Christopher Allan Webber
2011-02-14 11:07 ` Dan Davison [this message]
2011-02-14 14:50   ` Christopher Allan Webber
2011-02-14 15:22     ` Dan Davison
2011-02-14 16:12       ` Christopher Allan Webber
2011-02-23  3:21         ` Chris Malone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1y65inac2.fsf@94.196.56.147.threembb.co.uk \
    --to=dandavison7@gmail.com \
    --cc=cwebber@dustycloud.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.