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


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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

Subject: Re: DOCBOOK-APPS: graphic

On Tue, Nov 07, 2000 at 06:43:13PM -0200, Jorge Godoy wrote:
> The use of <graphic> isn't recommended.
> It's being replaced by
> <mediaobject>
>   <imageobject>
>     <imagedata fileref='file.gif' />
>   </imageobject>
> </mediaobjetc>
> You can get an alt text with:
> <mediaobject>
>   <imageobject>
>     <imagedata fileref='file.gif' />
>   </imageobject>
>   <textobject>
>     <phrase>alt text</phrase>
>   </textobject>
> </mediaobjetc>

<action object="trumpet" verb="blowing" owner="me">

I've got some customisations to Norm's stylesheets that let you do this;

   <!-- Pretend that fig1.eps and fig1.png both exist, and that it's a 
        diagram of a box with an "A" inside it.  -->

       <imagedata fileref="fig1">

       <literallayout class="monospaced">+----------+
|     A     |     

       <phrase>A box with an 'A' in it</phrase>

When you use to produce PS output, fig1.eps is chosen.  When you use it
produce PNG output, fig1.png is chosen.

You can use it to produce 2 types of HTML output, both with, and without
graphics.  If you use it to produce HTML with graphics, you get

    <img src="fig1.png" alt="A box with an 'A' in it">

If you use it produce HTML without graphics, you get

|     A     |

in the output.

Why do this, you ask?  Well, because you can then use a tool like lynx,
or (and FreeBSD prefers) w3m, to produce plain text output from this HTML.
So people who, for whatever reason (slow net link, bad vision, access to
character terminals only, dot-matrix printer, ...) don't want a version of
the document with graphics in, get a reasonable facsimile using ASCII art.

Implementation details can be seen at


and a sample document that uses this is at


Those are links to the CVS repository, including logs -- if you look back 
through the log messages you can see the commits where I made these changes,
and examine just the code changes that are necessary to support it.


Internet connection, $19.95 a month.  Computer, $799.95.  Modem, $149.95.
Telephone line, $24.95 a month.  Software, free.  USENET transmission,
hundreds if not thousands of dollars.  Thinking before posting, priceless.
Somethings in life you can't buy.  For everything else, there's MasterCard.
  -- Graham Reed, in the Scary Devil Monastery

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

Powered by eList eXpress LLC