Figures are allowed to float; you can't assume anything about their final
positions. Try putting the two \includegraphics commands within the same figure.
-- Scott
> Dear All,
>
> I have tried very hard on google to find command to overlay two eps
> figures in LaTeX, but I couldn't dig out the right info. I tried the
> below way try to overlay TEGraphic and TEGraphic_zoom, but actually
> what happens is TEGraphic_zoom shows before TEGraphic, no overlap. Can
> anybody give me a clue on how to do it? I think it should be very
> easy, but somehow I just can't get the job done. Thanks!
>
> \begin{figure}
> \centering
> \includegraphics{TEGraphic}
> \end{figure}
>
> \vspace*{-0.1in}
>
> \begin{figure}
> \centering
> \includegraphics{TEGraphic_zoom}
> \end{figure}
>
>
> Weiwei
Maybe you can try to embed one in a box of zero size? Then TeX may
typeset the next over the same place.
--
BOFH excuse #211:
Lightning strikes.
After you get the transparency working, you can physically overlay one
image on top of another by EITHER mixing the images in an image editor
so you have one image that contains what you want to see or OVERLAY
them using something like this:
\documentclass{article}
%
% COMPILE THIS WITH PSLATEX as opposed
% to pdflatex or "latex" programs because of the eps input
%
% This is a test of graphic overlay per
% The dvips option below is used if you compile with pslatex.
% If you use graphicx with pdflatex, use the option: pdftex
% or read:
% http://ctan.org/get/macros/latex/required/graphics/grfguide.pdf
\usepackage[dvips]{graphicx}
\begin{document}
%
% If you don't use the height and width options,
% be sure you know how big the image is on the page:
\includegraphics[width=3in,height=3in]%
{/Examples/Crosstab01e.eps}
\vskip-3in
\hbox to 3in{%
% the hfil inside the hbox pushes the image to the right
\hfil%
\includegraphics[width=1in,height=1in]%
{/Examples/junk.eps}%
}
\end{document}
\documentclass[demo]{article}
\usepackage{overpic,color}
\begin{document}
\begin{figure}
\begin{overpic}[width=\textwidth]{TEGraphic}
\put(0,0){\color{red}% just for demo
\includegraphics[%
width=3cm,
height=2cm]{TEGraphic_zoom}%
}
\end{overpic}
\end{figure}
\end{document}