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] | [List Home]


Subject: Re: [docbook-apps] DocBook <imagedata/> and scalefit attribute for transforms


Hi David,

On Fri, Jun 10, 2005 at 07:23:57AM -0400, David Nedrow wrote:

> Is there a [relatively] simple means of defining the viewport size
> of an <imagedata/> tag to the size of another element, possibly the
> enclosing element?
> 
> For example, in PDF output, I want the image scaled to fit the size
> of <figure/>, or, at the worst, <para/>. Anyway to handle this for
> the sample shown below?

I think what you want to do is described in Bob Stayton's book here:

http://www.sagehill.net/docbookxsl/ImageSizing.html

In particular:

> To keep a graphic for printed output at its natural size unless it
> is too large to fit the available width, in which case shrink it to
> fit, use scalefit="1", width="100%", and contentdepth="100%"
> attributes.

(I've corrected a typo for Bob there.)  Those attributes are on the
'imagedata' element.  You can supply those attributes for all your
document's images without regard to how large they actually
are---images that are too big are scaled down, and everything else is
left alone.

> DocBook XSL Stylesheets 1.68.1

You will need to replace fo/graphics.xsl with the current version from
CVS---this functionality only works post-1.68.1.


-- 
Paul.

w  http://logicsquad.net/
h  http://paul.hoadley.name/


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