On Oct 23, 2007, at 12:47 AM, Rudi van der Linde wrote:
Is it possible to resize a picture only if it is larger than a
predetermined size? I am automatically generating a LyX document
from a database and it is therefore not possible for me to know the
size of the pictures beforehand. I would like LyX to automatically
reduce the size of the picture if it won't fit on the page.
I was wondering if LyX is able to do the equivalent of the
following ImageMagick command:
"convert -resize "640x480>" picture.png"
While LaTeX won't resample an image (which is a good thing) one can
pull in a picture, measure it and then act contextually on said
measurement --- a co-worker wrote up macros which did this in a book
I did at a previous job.
http://www.atlis.com/services/composition/samples/TeX%20Sample%
20Pages/sandefur-C01-lw-1--3.pdf
Figures were placed across the marginal notes column if they were
wider than the text column.
The basic technique is:
- insert the graphic into a box
- measure the box
- do an if then on the measurement of the box, re-using it if
desired (which is slightly more efficient)
William
--
William Adams
senior graphic designer
Fry Communications