OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] prettyprinting code snippets


On Fri, Jun 12, 2009 at 19:01, DavePawson<davep@dpawson.co.uk> wrote:
> Mauricio Tavares wrote:
>>
>>    I am writing a an article in which I am including quite a few xml
>> examples and snippets. I have been using <programlisting> but was now
>> wondering if there is a way I can prettyprint those snippets. Anyone?
>
>
> ONly if the code is well laid out in the first place?
> I try to break lines at <= 70 chars to make sure
> it fits on a screen.
>
> If you want code highlighting etc.. sorry no.


When the PHP documentations where using DocBook-XSL we used to add a
customization layer to add special "tags" around <programlisting>, and
then post process the output to syntax highlight and format examples
(php, xml, ..).

For example with <programlisting role="php"><?php..
?></programlisting> the customization layer would generate
"<phpcode><?php.. ?></phpcode>" that was then post processed with
other applications.

Currently we are using "PhD" (PHP based Docbook Renderer) which
handles all these kinds of things :)

-Hannes


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]