By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,096 Members | 1,568 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,096 IT Pros & Developers. It's quick & easy.

tool for syntax coloring in html

P: n/a
in some online documentations, for examples:

http://perldoc.perl.org/perlref.html
http://www.ccs.neu.edu/home/dorai/t-...me-Z-H-17.html
http://www.haskell.org/hawiki/HaskellDemo

the codes are syntax colored.

Is there a tool that produce codes in html with syntax coloring?

Thanks.

Xah
xa*@xahlee.org
http://xahlee.org/

Oct 26 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Xah Lee wrote:
in some online documentations, for examples:

http://perldoc.perl.org/perlref.html
http://www.ccs.neu.edu/home/dorai/t-...me-Z-H-17.html
http://www.haskell.org/hawiki/HaskellDemo

the codes are syntax colored.

Is there a tool that produce codes in html with syntax coloring?


It is and its called highlight (available in most linux distributions)

--
Maciej "Fiedzia" Dziardziel (fiedzia (at) fiedzia (dot) prv (dot) pl)
www.fiedzia.prv.pl

Gravity isn't MY fault--I voted for velcro!
Oct 26 '05 #2

P: n/a
Xah Lee wrote:
in some online documentations, for examples:

http://perldoc.perl.org/perlref.html
http://www.ccs.neu.edu/home/dorai/t-...me-Z-H-17.html
http://www.haskell.org/hawiki/HaskellDemo

the codes are syntax colored.

Is there a tool that produce codes in html with syntax coloring?


I use SilverCity and this recipe to produce colored code listings for
the pysqlite documentation:
http://aspn.activestate.com/ASPN/Coo.../Recipe/252170

This is the documentation source:
http://initd.org/svn/pysqlite/pysqli...sage-guide.txt

This is the result:
http://initd.org/pub/software/pysqli...age-guide.html

HTH,

-- Gerhard

Oct 26 '05 #3

P: n/a
Gerhard wrote:
http://initd.org/pub/software/pysqli...age-guide.html


Can I suggest you to use a larger font for the code?It is pretty
difficult to parse with my
current screen resolution. BTW, pysqlite2 is pretty cool ;)

Michele Simionato

Oct 26 '05 #4

P: n/a
Xah Lee wrote:
Is there a tool that produce codes in html with syntax coloring?


I'm sure there's a million-and-one tools that will do what you want, and
suggest you search Google.

Personally, I've used vim to do this in the past. The following
generates marked-up code:

:runtime syntax/2html.vim

Regards,
Steve
--
Stephen Hildrey
E-mail: st***@uptime.org.uk / Tel: +442071931337
Jabber: st***@jabber.earth.li / MSN: fo*@hotmail.co.uk
Oct 26 '05 #5

P: n/a
I use Silvercity for my web site. SilverCity is a Python interface to
the Scintilla lexers. It's available at
http://silvercity.sourceforge.net/

I find the output from silvercity a bit verbose, so I have written a
few Python classes for cleaning up the output. The code is available at
http://fauskes.net/nb/syntaxhighlighting/

- Kjell Magne Fauske

Oct 26 '05 #6

P: n/a
I use gvim.

regards,

Philippe

Xah Lee wrote:
in some online documentations, for examples:

http://perldoc.perl.org/perlref.html
http://www.ccs.neu.edu/home/dorai/t-...me-Z-H-17.html
http://www.haskell.org/hawiki/HaskellDemo

the codes are syntax colored.

Is there a tool that produce codes in html with syntax coloring?

Thanks.

Xah
xa*@xahlee.org
? http://xahlee.org/


Oct 26 '05 #7

P: n/a
Xah Lee wrote:
.....
Is there a tool that produce codes in html with syntax coloring?
Does that mean you intend simply posting links to your
'articles' on computing in future?
Thanks.


I am confident a lot of us would be (thankful if you did).
Oct 26 '05 #8

P: n/a
Xah Lee wrote:
Is there a tool that produce codes in html with syntax coloring?


Sure. It's called "Cascading Style Sheets" (CSS), which is how these
sites have done it (as you can see if you "view source"). See articles
on SitePoint.com (and MANY others) for info. But this really has
nothing to do with Perl.

Oct 26 '05 #9

P: n/a

Xah Lee wrote:
in some online documentations, for examples:

http://perldoc.perl.org/perlref.html
http://www.ccs.neu.edu/home/dorai/t-...me-Z-H-17.html
http://www.haskell.org/hawiki/HaskellDemo

the codes are syntax colored.

Is there a tool that produce codes in html with syntax coloring?


I've used GNU Source-highlight with success.

http://www.gnu.org/software/src-high...highlight.html

Oct 26 '05 #10

P: n/a
A really easy one to use is Doxygen

Good luck,
Dimitri

Googmeister wrote:
Xah Lee wrote:
in some online documentations, for examples:

http://perldoc.perl.org/perlref.html
http://www.ccs.neu.edu/home/dorai/t-...me-Z-H-17.html
http://www.haskell.org/hawiki/HaskellDemo

the codes are syntax colored.

Is there a tool that produce codes in html with syntax coloring?


I've used GNU Source-highlight with success.

http://www.gnu.org/software/src-high...highlight.html


Oct 26 '05 #11

P: n/a
I use htmlize for that. you can try that.
http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el

Oct 29 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.