Re: example code
- From: Alexander Kirillov <kirillov math sunysb edu>
- To: GNOME Doc List <gnome-doc-list gnome org>
- Subject: Re: example code
- Date: 19 Jun 2002 17:04:03 -0400
There are several standard ways to insert code from a separate file.
Assuming your example code is in example.c, you could use one of these
methods:
a. define in the beginning of the document
<!ENTITY example SYSTEM "example.c">
and then use
<programlisting>
&example;
</programlisting
b. use
<imageobject> <imagedata fileref="example.c" format="linespecific"/>
</imageobject>
(this is a dirty but widely used trick). DocBook 4.2 (at the moment,
still a draft) will introduce proper way of doing it:
<textobject> <textdata fileref="example.c" format="linespecific"/>
</textobject>
Sasha
On Thu, 2002-06-13 at 04:35, Murray Cumming wrote:
> The gtkmm manual is in DocBook XML format. It contains example code but it
> keeps getting out of sync with the actual example sources. Is there any
> known/recommended way to insert example code into the text automatically?
>
>
> Murray Cumming
> murrayc usa net
> www.murrayc.com
>
> _______________________________________________
> gnome-doc-list mailing list
> gnome-doc-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-doc-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]