[dev-context] \setlayer + \externalfigure problem

Peter Rolf peter.rolf at arcor.de
Thu Jun 14 23:32:57 CEST 2007


Hi,

I ran into a \setlayer problem while including a bitmap graphic from a
figure database. The position of the gfx was slightly shifted to the
right. No problems, if I included the identical graphic from a single file.

\setlayer[foo][x=0pt,y=0pt ]{\externalfigure[gfx_from_a_db.png]}% shift!
\setlayer[foo][x=0pt,y=50pt]{\vbox{\externalfigure[gfx_from_a_db.png]}}%  ok
\setlayer[foo][x=0pt,y=100pt]{\externalfigure[gfx.png]}% ok
\setlayer[foo][x=0pt,y=150pt]{\hbox{\externalfigure[gfx.png]}}% shift

The result of \externalfigure differs (mode) for the two inclusion
methods. Also it looks like \setlayer does not ensure, that the content
is in the (position neutral) vertical mode. Is there a reason for this?
Currently I fixed it locally with

\ifhmode\vbox\bgroup#1\egroup\else#1\fi ,

but a more global approach would be prefered.

Any comments welcome.


Greetings,  Peter


More information about the dev-context mailing list