[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: imageobject width= broken in XSL for HTML?
On Tue, Dec 17, 2002 at 01:52:31PM +0000, Marc Palmer wrote: > > Hi, > > I came across a funny just now. I'm trying to get an image (mediaobject) > to align right and not be "inline" i.e. text should not start until after it. > > To do this I thought I'd use: > > <mediaobject> > <imageobject> > <imagedata align="right" fileref="mypict.gif" format="GIF" > width="100%"/> > </imageobject> > </mediaobject> > > Having seen that on www.docbook.org using width= will change the viewport > size but still display the image at its intrinsic size. > > This didn't work in the HTML output it stretched the image to full page > width! The HTML it generated included a TABLE to wrap the image with > WIDTH="100%" but also it put WIDTH="100%" in the IMG tag! > > The SVG version of the same image came out fine in PDF (after FOP > processing the FO) with just width="100%" so I think this is a bug in the > HTML XSL templates. > > To workaround it, you can specify the exact pixel width of the image in > contentwidth= which is OK, but not ideal. > > If there is a better way to achieve what I want, please tell me. Actually, the behavior you see is as it is documented by Norm. If you read further down the page of http://www.docbook.org/tdg/en/html/imagedata.html you will see a table indicating how scalefit defaults are determined. If Viewport area is specified (width) but Content area is not (contentwidth), then the scalefit default is 1. That means it scales to fit the available viewport width. It is done for backwards compatibility. You want to set scalefit="0". -- Bob Stayton 400 Encinal Street Publications Architect Santa Cruz, CA 95060 Technical Publications voice: (831) 427-7796 The SCO Group fax: (831) 429-1887 email: bobs@sco.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC