Re: DOCBOOK-APPS: Including C source code in a document

From
Michael Wiedmann <>
Date
2000-07-21T14:09:32+00:00
ID
Thread
Re: DOCBOOK-APPS: Including C source code in a document
Jorge Godoy wrote:
 
> I am trying to include directly C source code into a DocBook document,
> but I'm having some problems with C elements. They are being parsed as
> SGML elements (such as <stdio.h> and & and other...). Is there any way
> to deactivate the parsing on a programlisting?

Try this (copied out of "DocBook; The Definitive Guide"):

<programlisting>
<![CDATA[
This is a programlisting so white       space and line
breaks are significant.  But it is also a CDATA
section so <emphasis>tags</emphasis> and &entities;
are not recognized.  The only markup that is recognized
is the end-of-section marker, which is two
"]"'s in a row followed by a >.
]]>
</programlisting>

Michael
-- 
Michael Wiedmann   office:  <>
                   private: <>