From: Christopher Allan Webber <cwebber@dustycloud.org>
To: Chris Malone <chris.m.malone@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Nice python listings colors, or solution to beamer + minted brokenness?
Date: Sun, 13 Feb 2011 23:24:43 -0600 [thread overview]
Message-ID: <8762sn89yc.fsf@dustycloud.org> (raw)
In-Reply-To: <AANLkTi=rdX4DKJodOskzY=saEN0F-x-Z=fVzCzntGBBC@mail.gmail.com> (Chris Malone's message of "Sun, 13 Feb 2011 21:11:47 -0500")
Hi Chris,
That'll work well enough for now I think. Thanks much for the response!
Chris Malone <chris.m.malone@gmail.com> 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={ReferenceDeskPanel}, emphstyle=\color{blue}
>
> to your =lstset= 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 <class number> argument as described in the manual.? I don't
> know how one could do this for every word that follows the Python
> =class= directive, as the =lstset= /key-value/ setup doesn't allow for
> such things...
>
> HTH,
>
> Chris
>
> On Sun, Feb 13, 2011 at 8:46 PM, Chris Malone <chris.m.malone@gmail.com> wrote:
>
> Hi Chris,
>
> I doubt this will fix the problem (it is more of a curiosity), but why in your =lstset= 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<br>
> class ReferenceDeskPanel(bpy.types.Panel):<br>
> . .bl_label = 'Reference Desk'<br>
> . .bl_space_type = 'VIEW_3D'<br>
> . .bl_region_type = 'TOOLS'<br>
> <br>
> . .def draw(self, context):<br>
> . . . .layout = self.layout<br>
> <br>
> . . . .row = layout.row()<br>
> . . . .row.prop(<br>
> . . . . . .context.scene, 'refdesk_search',<br>
> . . . . . .text="", icon='VIEWZOOM')<br>
> <br>
> . . . .search_string = context.scene.get('refdesk_search')<br>
> #+END_SRC<br>
> I've tried using listings with:
>
> #+begin_LaTeX<br>
> .\definecolor{keywords}{RGB}{255,0,90}<br>
> .\definecolor{comments}{RGB}{60,179,113}<br>
> <br>
> .\lstset{<br>
> . .language=\Python,<br>
> . .keywordstyle=\color{keywords},<br>
> . .commentstyle=\color{comments}emph,<br>
> . .procnamestyle=\color{blue}\textbf,<br>
> . .emphstyle=\color{black}\bfseries,<br>
> . .}<br>
> #+end_LaTeX<br>
> 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
>
> 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
>
--
𝓒𝓱𝓻𝓲𝓼𝓽𝓸𝓹𝓱𝓮𝓻 𝓐𝓵𝓵𝓪𝓷 𝓦𝓮𝓫𝓫𝓮𝓻
next prev parent reply other threads:[~2011-02-14 5:24 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 [this message]
2011-02-14 11:07 ` Dan Davison
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8762sn89yc.fsf@dustycloud.org \
--to=cwebber@dustycloud.org \
--cc=chris.m.malone@gmail.com \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).