[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Re: Pretty printing source code
On Mon, Nov 24, 2003 at 02:41:06PM -0500, Norman Walsh wrote: > >Every now and then someone asks about pretty-printing source code. > >It's certainly possible to put inline markup inside a programlisting > >to do it, the trick is getting some pretty-printing engine to generate > >the right markup. I've started myself to play with GNU enscript (http://people.ssh.com/mtr/genscript/), which is a modularized pretty-printer, with support for a good number of languages. It does not have a DocBook output definition yet, but it should not be a problem to add one, and I may do that at some point it noone does that first (which I'd welcome wholeheartly ;) - as well as a DocBook output filter for noweb, FWIW. However, it currently does HTML (although not conformant, see http://bugs.debian.org/221513 where more patches should appear once the current problems with the Debian servers are fixed). For a demonstration of its use for pretty-printing embedded code in a document, see http://ydirson.free.fr/en/software/noweb/dh-kpatches.html This is done using noweb, with filters in http://ydirson.free.fr/en/software/noweb/. The actual pretty-print filter (http://ydirson.free.fr/en/software/noweb/enscript-html) is probably more complicated that what would be needed for a non-litprog code snippet. HTH, -- Yann Dirson <Yann.Dirson@fr.alcove.com> http://www.alcove.com/ Technical support manager Responsable de l'assistance technique Senior Free-Software Consultant Consultant senior en Logiciels Libres Debian developer (dirson@debian.org) Développeur Debian
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]