This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Including C source code in a document
- To: DocBook-Apps ML <docbook-apps at lists dot oasis-open dot org>
- Subject: Re: DOCBOOK-APPS: Including C source code in a document
- From: Michael Wiedmann <michael dot wiedmann at detewe dot de>
- Date: Fri, 21 Jul 2000 16:01:40 +0200
- Organization: Cordless Technology
- References: <kpittzbngv.fsf@dagon.conectiva>
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: <michael.wiedmann@detewe.de>
private: <mw@miwie.in-berlin.de>