SyntaxHighlighter: For HTML from DocBook

SyntaxHighlighter screenshot

Alex Gorbatchev’s SyntaxHighlighter has support for about as many languages as we are getting out of the box with DocBook XSL highlighting. Both the DocBook XSL and SyntaxHighlighter solutions let you define your own highlighting schemes.

Three features of SyntaxHighlighter beat DocBook XSL highlighting:

  • CSS is independent, not embedded.
  • Double-click selects the entire code sample.
  • (Automatic) line numbers are not included when you select code.

Two features of DocBook XSL highlighting beat SyntaxHighlighter:

  • Runs at build time, adding less to web pages.
  • Preserves content inside verbatim elements.

At this point, I’m still debating whether to replace what we have now with SyntaxHighlighter. Trying it out on the OpenDJ docs.

Advertisements

Leave a comment

Filed under Docs, Tools

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s