[texhax] Placing unknown images arbitrarily by lower left corner
pfd at pfdstudio.com
Wed Mar 30 19:35:26 CEST 2011
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.
For example, when the XML specifies size and position of the image,
myns:transformation="1 0 0 1 -8.71591 -17.5625"/>
I can say generate LaTeX that looks like:
I was able to find the upper left corner of the image because I know where
the transformation puts the lower left corner, and I know the height of the
However, sometimes the XML only specifies a transformation (and again, the
translation components refer to the *lower* left corner of the image):
myns:transformation="0.331209 0 0 0.331209 0 -11.7663"/>
The content-height and content-width attributes just give me scale factors
from the transform matrix.
Is there a way to determine how to place the image in LaTeX given this? I
don't care about the dimensions per se, but I might need to know the height
to determine the upper left corner, given the lower left corner.
Is there a way around this? I think this describes the problem, but I can
try to be more explicit if this is not clear.
The Tech Curmudgeon
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the texhax