[texhax] Placing unknown images arbitrarily by lower left corner

Peter Davis pfd at pfdstudio.com
Sun Apr 3 01:57:49 CEST 2011

On Wed, Mar 30, 2011 at 1:35 PM, Peter Davis <pfd at pfdstudio.com> wrote:

> I'm working on a program to convert XML documents into LaTeX.  The XML has
> several possibly ways of specifying how an image should be placed, and I'm
> trying to find ways to produce LaTeX that will place the image correctly,
> without having to actually open the image file in the XML->LaTeX converter.

I had some success just using \begin{picture}(w,h) to reserve the area for
the picture.  Then \put(x,y) let me place the image within that area.  So I
tried using Heiko's settobox package to get the dimension of the image, but
the picture environment won't let me specify actual dimensions.  They
apparently have to be dimensionless quantities:

\begin{picture}(400,300) %works
\begin{picture}(400pt,300pt) %fails  (! Missing number, treated as zero.)

I was hoping to do something like the following example, but I don't know
how to get around the "missing number" problem.  Am I barking up the wrong
tree?  Thanks!









The Tech Curmudgeon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texhax/attachments/20110402/751834a7/attachment.html>

More information about the texhax mailing list