William Stein wrote:
> On Fri, Sep 11, 2009 at 11:41 AM, Pat LeSmithe <qed...@gmail.com> wrote:
>> To colorize code blocks in trac descriptions and comments, try
> Are you saying "Hey guys, here's a feature that is in trac already,
> but nobody seems to be using it.  In order to use it, put #!python at
> the top of your {{{ pre-formats?  Oh, by the way, you trac admins
> might consider installing some additional plugins."

I apologize.  No offense was intended.  Should I make a list of
potentially useful trac and wiki plugins?

By the way, here are some ways to syntax-highlight code listings in a
terminal window.  Save

#!/bin/bash
#/usr/bin/highlight --ansi $1 | /usr/bin/less
#/usr/bin/source-highlight -i $1 -f esc | /usr/bin/less
/usr/bin/pycolor $1 | /usr/bin/less
#/usr/bin/pygmentize -g $1 | /usr/bin/less

in a text file called "hi," say.  Be sure to uncomment and edit the line
for one installed program [1].  Then, make the file executable, put it
in a $PATH directory, hash -r (rehash in tcsh), and use the resulting
script just like "less":

prompt> hi foo.py

A mild warning: Some of the highlighters are louder and/or smarter than
the others.

[1] pycolor and pygmentize are already available on sage.math (and part
of Sage!).  To use the system-wide pygmentize, add

/usr/local/sage/local/bin

to $PATH.

On Fedora 10 Linux, the relevant RPMs are highlight, source-highlight,
ipython, and python-pygments, respectively.  I have no opinion on
whether the first two should be installed.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to