如何让段落文本继续在图形上显示?

如何让段落文本继续在图形上显示?

我有一个图形(在矩形框内),图像左半部分的上部三分之二处有空白。我想让段落文本继续穿过这个空白区域(好像图形不存在一样)。我怎样才能让我的文本继续出现在图形上?

\begin{tabular}{ccc}

\begin{minipage}{.3\linewidth}
\begin{itemize}
\item I want to continue this on the figure,
\item overwriting whatever is on the figure under the text. 
\item The reason is that the figure has lots of blank space here
\item though the figure not rectangular; 
\item part of the image will be right  below this bullet point
\end{itemize}
\end{minipage}

\begin{minipage}{.3\linewidth}
\begin{figure}  
\hspace*{-3cm}
\centering
\includegraphics[scale=0.25]{figure.pdf}
\end{figure}
\vspace*{-1cm}
\end{minipage}

\begin{minipage}{.3\linewidth}
\begin{itemize}
\item I will put some more text here
\item but I am more concerned about the one on the left. 
\end{itemize}
\end{minipage}

\end{tabular}

使用 \hspace*{-3cm} 时,图形优先于文本,因此它会覆盖并隐藏文本,而我想要实现相反的效果。

答案1

这看起来像是一个工作\tikzmark

具体来说,您需要在文本之前打印图像,因此在您知道文本的位置之前。 \tikzmark将位置保存在辅助文件中,以便在下次运行 LaTeX 时使用。[inner sep=0pt]只有在您决定对齐边缘而不是中心时,这才重要。

顺便说一句,你的tabular比 更宽\textwidth。有更好的方法可以minipage水平对齐 s。

\documentclass{article}
\usepackage{showframe}
\usepackage{graphicx}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\begin{tikzpicture}[remember picture,overlay]
\node[inner sep=0pt, xshift=-2cm, yshift=-1cm] at (pic cs:stickit) 
  {\includegraphics[scale=0.4]{example-image}};
\end{tikzpicture}

\noindent\begin{tabular}{ccc}
\begin{minipage}{.3\linewidth}
\begin{itemize}
\item I want to continue this on the figure,
\item overwriting whatever is on the figure under the text. 
\item The reason is that the figure has lots of blank space here
\item though the figure not rectangular; 
\item part of the image will be right  below this bullet point
\end{itemize}
\end{minipage}
&
\begin{minipage}{.3\linewidth}
\centering\tikzmark{stickit}
\end{minipage}
&
\begin{minipage}{.3\linewidth}
\begin{itemize}
\item I will put some more text here
\item but I am more concerned about the one on the left. 
\end{itemize}
\end{minipage}
\end{tabular}
\end{document}

首先叠加图像

不要忘记运行两次。

相关内容