This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] Programming language in programlisting


Hi,

according to your helpful suggestions I created a first version of the syntax highligter for saxon.

You can find it at http://trieloff.net/doctutorial/jedit.html in source and binary packages. Please feel free to report bugs and patches to me per email.

The code is mainly based on jedit 4.0 and the code2html plugin, so you need jedit 4.0 (jedit 4.1 will not work) and the plugin in your classpath when running saxon. The directory conf which contains the highlighting modes and the highlighting configuration must be in your working directory.

Simply import {fo|html}code.xsl in your customization layer and make sure to set the parameters use.extensions and codehighlighting.extension to 1. If you want to use linenumbering, please switch linenumbering.extension to 1, because the plugin uses it's own gutter and this would result in duplicate effords.

You have to set the highlighting mode via
<programlisting role="xml"> or role="java" or role="perl"
because the plugin cannot determine the programming language automatically and I don't want to create an extension to docbook.


with best regards

Lars Trieloff


On 2003.03.31 22:05 Lars Trieloff wrote:
Hi,

I am writing a Saxon-Extension for Syntax-Highlighting code in programlistings. My question is, how to specify the programming language of the code in the programlisting.

As I understood lang, it is only for human languages. The other option seems to be role, so which version is better?

<programlisting lang="java">

or

<programlisting role="java">

with best regards

Lars Trieloff

--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-unsubscribe at lists dot oasis-open dot org For additional commands, e-mail: docbook-help at lists dot oasis-open dot org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]