来源: [url=http://www.webresourcesdepot.com/11-syntax-highlighters-to-beautify-code-presentation/][color=#0000ff]webresourcesdepot.com[/color][/url]
[b]11 Syntax Highlighters To Beautify Code Presentation[/b]:
[url=http://qbnz.com/highlighter/index.php][color=#0000ff]GeSHi[/color][/url] (Generic Syntax Highlighter – With PHP)
[url=http://qbnz.com/highlighter/index.php][img=480,134]http://www.21andy.com/blog/upload/2009/0511/8cd89728e89c1fa1.gif[/img][/url]
[b]GeSHi[/b] is a powerful [b]syntax highlighter script[/b] that supports almost every language.
It is first created for phpBB forum system but became a project itself. It requires PHP to run (there is also a [url=http://qbnz.com/highlighter/faq.php#q_14][color=#0000ff]hack to make it work under ASP[/color][/url]).
[url=http://alexgorbatchev.com/wiki/SyntaxHighlighter][color=#0000ff]SyntaxHighlighter[/color][/url] (With JS)
[url=http://alexgorbatchev.com/wiki/SyntaxHighlighter][img=480,134]http://www.21andy.com/blog/upload/2009/0511/599ec09d899bd273.gif[/img][/url]
This is a flexible & extensible [b]syntax highlighter[/b] built with JavaScript. It supports a wide range of languages from CSS to PHP or C++ to SQL.
[b]SyntaxHighlighter[/b] offers ready-to-use themes an new ones can be created easily for a custom presentation.
It has [url=http://alexgorbatchev.com/wiki/SyntaxHighlighter:Integration][color=#0000ff]support for 3rd party applications[/color][/url] like Blogger, WordPress, Joomla & many others.
[url=http://code.google.com/p/google-code-prettify/][color=#0000ff]Google Code Prettify[/color][/url] (With JS)
[url=http://code.google.com/p/google-code-prettify/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/27eadd0c5d1bc34a.gif[/img][/url]
This is the script [b]used by the Google Code website[/b]. The script auto-detects the language used and [b]highlights the code[/b] accordingly.
It is also customizable via CSS.
There is also an AS3 port to this code highlighting script named [url=http://code.google.com/p/as3syntaxhighlight/][color=#0000ff]as3syntaxhighlight[/color][/url].
[url=http://softwaremaniacs.org/soft/highlight/en/][color=#0000ff]Highlight.js[/color][/url] (With JS)
[url=http://softwaremaniacs.org/soft/highlight/en/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/679820476c73c07e.gif[/img][/url]
[b]Highlight.js[/b] is very easy to use because it works automatically: finds blocks of code, detects a language, highlights it.
It has [url=http://softwaremaniacs.org/soft/highlight/en/addons/][color=#0000ff]support for 3rd party applications[/color][/url] and provides a [b]Firefox extension[/b] for viewing code that doesn’t have [b]syntax highlighting[/b].
[url=http://shjs.sourceforge.net/][color=#0000ff]SHJS – Syntax Highlighting in JavaScript[/color][/url] (With JS)
[url=http://shjs.sourceforge.net/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/1dbc6e398cd26103.gif[/img][/url]
[b]SHJS[/b] uses language definitions from [url=http://www.gnu.org/software/src-highlite/][color=#0000ff]GNU Source-highlight[/color][/url]. This gives [b]SHJS[/b] the ability to highlight source code written in many different languages.
[url=http://noteslog.com/chili/][color=#0000ff]Chili[/color][/url] (With jQuery)
[url=http://noteslog.com/chili/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/67be173ea182c81c.gif[/img][/url]
[b]Chili[/b] is a [b]code higlighter plugin for jQuery[/b]. It works very fast & can be totally customized.
It comes bundled with support for popular languages & the download package has examples on usage.
[url=http://startbigthinksmall.wordpress.com/2008/10/30/beautyofcode-jquery-plugin-for-syntax-highlighting/][color=#0000ff]beautyOfCode[/color][/url] (With jQuery)
[url=http://startbigthinksmall.wordpress.com/2008/10/30/beautyofcode-jquery-plugin-for-syntax-highlighting/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/f2e624a93699cfdb.gif[/img][/url]
This [b]jQuery syntax highlighter plugin[/b] uses Alex Gorbatchev’s [b]SyntaxHighlighter[/b] but with a twist: produces more xhtml-compliant codes.
[url=http://pradador.com/code/lighterjs/][color=#0000ff]Lighter.js[/color][/url] (With MooTools)
[url=http://pradador.com/code/lighterjs/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/6a8d399f64d4fd35.gif[/img][/url]
[b]Lighter.js[/b] is a [b]MooTools-based code highlighter[/b] that can create outputs in various formats like ordered lists and tables.
It has a [b]GeSHi-like[/b] class naming & requires MooTools 1.2.1+
[url=http://22bits.exofire.net/browse/code/colourcode][color=#0000ff]ColourCode[/color][/url] (With Ruby)
[url=http://22bits.exofire.net/browse/code/colourcode][img=480,134]http://www.21andy.com/blog/upload/2009/0511/cd3601d9365b6b98.gif[/img][/url]
[b]ColourCode[/b] is written in [b]Ruby[/b]. It can read a source file and generate a syntax highlighted version in various formats.
[url=http://ultraviolet.rubyforge.org/][color=#0000ff]Ultraviolet[/color][/url] (With Ruby)
[url=http://ultraviolet.rubyforge.org/][img=480,134]http://www.21andy.com/blog/upload/2009/0511/d5ab008d88621957.gif[/img][/url]
[b]Ultraviolet[/b] is a [b]syntax highlighting engine[/b] that runs on [b]Ruby[/b]. It has support for 50+ languages & 20+ themes.
[url=http://pygments.org/][color=#0000ff]Pygments (With Python)[/color][/url]
[url=http://pygments.org/][color=#0000ff][img=480,134]http://www.21andy.com/blog/upload/2009/0511/e6f2ec8652701eec.gif[/img][/color][/url]
It is a [b]syntax highlighter[/b] that is built with [b]Python[/b]. [b]Pygments[/b] supports a wide range of languages, various output formats & it is usable as a command-line tool or as a library.