This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re: DOCBOOK: Efficiently including images in DocBook


On Fri, Sep 29, 2000 at 10:46:04AM -0400, Norman Walsh wrote:
> Ah, I see. Ok, I think the answer is to make the *-mediaobject-extensions
> and *-mediaobject-notations variables into functions and then test
> the backend:
> 
> (define (preferred-mediaobject-extensions)
>   (if (equal? 'backend 'tex)
>     (list "png" "eps" "ps" "jpg" "jpeg")
>     (list "eps" "ps" "jpg" "jpeg" "png")))
> 
> So that the TeX version will prefer PNG over EPS.

How will that work?

When I'm using the TeX backend to product postscript then I want it to 
use EPS.  When I'm using the TeX backend to produce PDF then I want it
to use the PNG.

At the moment, I'm groping towards a solution that runs jade twice,
once with the output sent to book.tex-ps, and once with the output
sent to book.tex-pdf.

What (I think) we need is more granularity in the back end specification,
instead of it being one of {html | {ps | rtf | mif}}.

At the very least, we need PDF as an option, and what might be better
is a way to tell the stylesheet "Given the choice, always prefer .foo
as an image format, rather than trying to work out what's best".

This is what I was trying to do when specifying the default image extension.

What I could do instead is

    <![ % image.png; [ <!ENTITY image-ext "png"> ]]>
    <![ % image.eps; [ <!ENTITY image-ext "eps"> ]]>

    ...

       <imageobject fileref="foo.%image-ext;" format="image-ext">

    ...

but this is more typing than just

       <imageobject fileref="foo">

and letting the stylesheets figure out what extension to add.

At the moment, the stylesheets already do this, but they try and guess which
one to use and get it wrong.  Forcing them to pick another option is 
probably pretty trivial to code (and I'm happy to write the code to do it)
I just want to make sure that we're all in agreement about what the problem
is, and the best way to solve it -- there might be other considerations I'm
not aware of.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]