This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Need help including c source
- To: Yann Dirson <ydirson at alcove dot fr>
- Subject: Re: DOCBOOK-APPS: Need help including c source
- From: Eric Richardson <eric dot richardson at milagrosoft dot com>
- Date: Thu, 18 Oct 2001 10:39:07 -0700
- Cc: docbook <docbook-apps at lists dot oasis-open dot org>
- List-Id: <docbook-apps.lists.oasis-open.org>
- Organization: MilagroSoft Inc.
- References: <3BCEFF81.5060801@milagrosoft.com><20011018190104.B6946@kasba.alcove-fr>
Yann Dirson wrote:
> On Thu, Oct 18, 2001 at 09:12:49AM -0700, Eric Richardson wrote:
>
>>I'm trying to include C source into docbook but I'm having problems with
>>the #include <stdio.h>. I really would like to have the source compile
>>as is and include as is into the document.
>>
>
> Instead of using an entity, you can use:
>
> <imagedata fileref="foo.c" format="linespecific">
>
> That roughly means, consider foo.c as an image encoded in the
> "linespecific" format - not a common way of looking at things, but
> semantically correct I think.
>
> docbook-dsssl 1.73 should work out-of-the box with this construct, I
> don't know for sure about docbook-xsl, which I don't use.
I tried this two different ways for docbook-xsl 1.45 and nothing comes
out in the html. Thanks for the help nonetheless as I would have never
figured out that markup - not even with PSGML. Perhaps I need extension
enabled.
Eric
source
<figure>
<title>C Source</title>
<programlisting><filename>myfunc.c</filename>
<inlinemediaobject>
<imageobject>
<imagedata fileref="myfunc.c" format="linespecific"/>
</imageobject>
</inlinemediaobject>
</programlisting>
</figure>
<mediaobject>
<imageobject>
<imagedata fileref="myfunc.c" format="linespecific"/>
</imageobject>
</mediaobject>
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>