This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Syntax coloring of programlisting
- From: Stefan Seefeld <seefeld at sympatico dot ca>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Mon, 08 Nov 2004 18:19:52 -0500
- Subject: Re: [docbook-apps] Syntax coloring of programlisting
- References: <200411081808.15912.frans.englich@telia.com>
[I reply I did earlier from a non-subscribed address seems to have been filtered
out, so let me try again...]
Hi Frans,
Frans Englich wrote:
> Hello all,
>
> I'm thinking about doing syntax highlightning of example code, typically found
> in Docbook's programlisting[1] element. I've never seen this in Docbook, only
> in web forums and such. Have anyone any experience with this, or is aware of
> existing solutions?
The closest tool I could think of for what you want is 'enscript'. It knows how
to parse quite a number of languages, and supports multiple output formats,
such as ps and html.
I would just write together some scripts that inject the generated output (either
text or image) into the output stream.
I don't think docbook and docbook formatters are the right place to look for
parsers for programming languages, especially if your focus is on syntax, not
semantics.
Regards,
Stefan