1

I want to overlay one graphic over the another in my latex, however the white background is annoyingly transparent. To over come this I want to draw a rectangle of white behind the overlayed figure. like this:

\begin{figure}
\begin{overpic}[scale=0.48]%
{Plots/A_Mesh_a_d:0.056.eps}
\put(50,10){\psframe[framearc=0.3,% The box !!!!!
                 fillstyle=solid,
                 fillcolor=white,
                 linestyle=solid,
                 linecolor=white,](0,0)(0.27\textwidth,2.6)}
\put(50,10){
\includegraphics%
[width=0.25\textwidth]%
{Plots/A_Alligned_l.eps}}
\end{overpic}}
\end{figure}

But I get the error:

!!! Warning: Empty Bounding Box is returned by Ghostscript!
!!!   Page 8: 0 0 0 0
!!! Either there is a problem with the page or with Ghostscript.
!!! Recovery is tried by embedding the page in its original size.

I guess an all white box dosn't have its bounding box detected? Any Ideas why? Am I doing something stupid?

Thanks

p.s. another minor annoance with the above is that i cant use

\begin{overpic}[width=0.45\textwidth]%

withough screwing up the scaling of the overlayed graphic

\includegraphics[width=0.25\textwidth]%

so i have to use scale instead and guess a good value.

migrated from stackoverflow.com Feb 29 '12 at 15:22

This question came from our site for professional and enthusiast programmers.

  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – Werner Feb 29 '12 at 15:24
3

It makes no sense to mix LaTeX and PSTricks commands. However, I cannot test your example in fact of missing images. This works with a red box to make it visible:

\documentclass{article}
\usepackage{pricks}
\usepackage{overpic}

\begin{document}

\begin{overpic}[scale=0.48]{tiger}
\put(50,10){\psframe*[framearc=0.3,% The box !!!!!
                 linecolor=red](0,0)(0.27\textwidth,2.6)}
\put(50,10){\includegraphics[width=0.25\textwidth]{tiger}}
\end{overpic}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy