我想将图片(图形)插入到使用两列布局的文档中。但是,我希望它占据一整页,而不是集中在其中一列上。目前,如果我向图中添加
[p]
修饰符,整个图像会出现在最后一页,而不是文档的中间。
如何强制一个页面切换回单栏布局并在那里插入一张大图片?
使用
figure*
环境。所以而不是
\begin{figure}[ht] % I typically use ht
\centering
...
\end{figure}
你应该使用
\begin{figure*}[ht]
\centering
...
\end{figure*}
这也适用于表格(即
table*
)。
请考虑此链接了解更多信息
它并不优雅,但是加载了
float
包后你可以使用:
\begin{figure}[H]
\onecolumn\includegraphics{arc}
\end{figure}
\twocolumn
但是你必须将这段代码放置在源代码中的确切位置。否则,您将在两列页面的任何地方出现分页符,然后使用图像图像进行分页。
补充@Crowley的答案,以避免实施后分页。 不要使用 wocolumn,而是使用此包 \usepackage{multicol}。 然后,
\begin{multicols}{2}
\section Write or place anything you want
\end{multicols}
这对我有用!
为了以一列样式插入图形,同时图形前后的文本必须保持为双列样式,您可以使用 cuted 包提供的 strip 命令
\usepackage{cuted}
XXXXXXXXXXXXXXXX % text before the figure
\begin{strip}
\centering
\includegraphics[width=\linewidth]{ Figure name}
\captionof{figure}{Your caption here}
\label{fig:yourlabel}
\end{strip}
XXXXXXXXXXXXXXXXX %text after page
\usepackage{multicol}
在您的序言中。
然后
\begin{document}
\begin{multicols}{2}
blah blah blah text
\end{multicols}
\begin{figure}[H]
\includegraphics[width=1\textwidth]{arc}
\end{figure}
\begin{multicols}{2}
blah blah blah text
\end{multicols}
\end{document}
这又丑又脏。并且您将需要摆弄您认为的位置以使文本平衡,但这正是您所要求的。