468,117 Members | 1,592 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,117 developers. It's quick & easy.

tool for syntax coloring in html

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
11 1672
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
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
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
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
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
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
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
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

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
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
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.

Similar topics

7 posts views Thread by Ruthless | last post: by
50 posts views Thread by Edward K. Ream | last post: by
2 posts views Thread by Larry Werner | last post: by
3 posts views Thread by Gordan | last post: by
reply views Thread by Markk | last post: by
2 posts views Thread by Dan | last post: by
7 posts views Thread by braver | last post: by
13 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.