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.  -->

   <mediaobject>
     <imageobject>
       <imagedata fileref="fig1">
     </imageobject>

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

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

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

    <pre>+----------+
|     A     |
+-----------+</pre>

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

    http://www.freebsd.org/cgi/cvsweb.cgi/doc/share/sgml/freebsd.dsl
    http://www.freebsd.org/cgi/cvsweb.cgi/doc/share/sgml/freebsd.dtd
    http://www.freebsd.org/cgi/cvsweb.cgi/doc/share/mk/doc.docbook.mk

and a sample document that uses this is at

    http://www.freebsd.org/cgi/cvsweb.cgi/doc/en_US.ISO_8859-1/articles/vm-design/

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.

</action>

N
-- 
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