This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: Re: DOCBOOK: Efficiently including images in DocBook
- To: Norman Walsh <ndw at nwalsh dot com>
- Subject: Re: DOCBOOK-APPS: Re: DOCBOOK: Efficiently including images in DocBook
- From: Nik Clayton <nik at nothing-going-on dot demon dot co dot uk>
- Date: Fri, 29 Sep 2000 15:31:11 +0100
- Cc: docbook-apps at lists dot oasis-open dot org,Nik Clayton <nik at nothing-going-on dot demon dot co dot uk>
- Organization: Nik at home, where there's nothing going on
- References: <20000924142624.A51240@canyon.nothing-going-on.org><87vgvkpf0j.fsf@nwalsh.com> <20000925214923.A350@canyon.nothing-going-on.org><87wvfwbtu4.fsf@nwalsh.com>
On Thu, Sep 28, 2000 at 08:10:27AM -0400, Norman Walsh wrote:
> | It's attached. I've verified this with 1.57 of the stylesheets. The HTML
> | and HTML-without-graphics versions are produced correctly, the PS and PDF
> | versions both use the ASCII art instead of the appropriate image file.
>
> Ok, the trouble is that mediaobject doesn't have exactly the same semantics
> as graphic. The whole point of mediaobject was to allow documents to specify
> multiple alternative presentations. You have:
<snip>
> And you're expectation is that the stylesheets will use
> %graphic-default-extension% to augment 'fig1' appropriately. What you
> "should" have in your document is:
>
> <mediaobject>
> <imageobject>
> <imagedata fileref="fig1.eps">
> </imageobject>
> <imageobject>
> <imagedata fileref="fig1.png">
> </imageobject>
> <textobject>
> <literallayout>
> +---------+
> | A |
> +---------+
> </literallayout>
> </textobject>
> <textobject>
> <phrase>My first image</phrase>
> </textobject>
> </mediaobject>
Last time I tried that, the stylesheets got confused. Specifically, if you
were using the print stylesheet then they would select the .eps file. This
broke PDF generation, where the .png file should be used. The only way
I came up with to stop this was to either
a) Use marked sections to turn on or off different imageobjects as
necessary (which is ugly, as you need to do it for each image)
or
b) Fiddle with the filename extension as per my example.
> With this markup, the print and HTML stylesheets will make the right
> selections.
I've just tried that.
book.html Works as expected.
book.html-txt Includes the image, instead of replacing it with
the <literallayout> section.
book.ps Works as expected.
book.pdf Doesn't include the image, the log includes
"! LaTeX Error: Unknown graphics extension: .eps."
because the stylesheets are assuming that print
output means that they should always use the EPS
file, which is not the case for PDF output and
pdfjadetex.
This is the situation I'm trying to work around.
> Having said that, I've also fixed it so that a single imageobject with a
> filename that does not have an extension works as you expected :-)
Can you send me the patch, and I'll check that it works as expected here.
Thanks,
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