使用 Pstricks 绘制带有白色边框的白色方框失败?

使用 Pstricks 绘制带有白色边框的白色方框失败?

我想在 latex 中将一个图形叠加在另一个图形上,但白色背景却很烦人,而且是透明的。为了解决这个问题,我想在叠加的图形后面画一个白色矩形。如下所示:

\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}

但我收到了错误:

!!! 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.

我猜全白的框没有被检测到?有什么想法吗?我是不是在做蠢事?

谢谢

ps 上面的另一个小问题是我不能使用

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

而覆盖图形的缩放则被打乱

\includegraphics[width=0.25\textwidth]%

所以我必须使用比例并猜测一个好的值。

答案1

混合使用 LaTeX 和 PSTricks 命令是没有意义的。但是,我无法测试您的示例是否确实缺少图像。这适用于红色框以使其可见:

\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}

在此处输入图片描述

相关内容