我有几个图表,每个图表都需要有自己的页面。我想将它们放在 Overleaf 文档的连续页面中。这些图表的 Latex 代码写在一起,但 Overleaf 会自动用其他文本将它们分开,使它们不连续。
\begin{figure*}[p]
\centering
\includegraphics[width=\textwidth]{fig1.png}
\caption{caption1}
\end{figure*}
\begin{figure*}[p]
\centering
\includegraphics[width=\textwidth]{fig2.png}
\caption{caption2}
\end{figure*}
\begin{figure*}[p]
\centering
\includegraphics[width=\textwidth]{fig3.png}
\caption{caption3}
\end{figure*}
\begin{figure*}[p]
\centering
\includegraphics[width=\textwidth]{fig4.png}
\caption{caption4}
\end{figure*}
答案1
\textheight
一旦将图表(包括标题)的宽度设置为 ,它们的高度是否可能超过\textheight
?如果是这样,以下方法仍然有效。
\documentclass[twocolumn]{article}
\usepackage[demo]{graphicx} % remove 'demo' option in real document
\usepackage{afterpage} % for '\afterpage' macro
\begin{document}
% ... document material
\afterpage{%
\clearpage % flush any queued-up floats
\begin{figure*}[p!]
\includegraphics[width=\textwidth]{fig1}
\caption{caption1}
\end{figure*}
\clearpage
\begin{figure*}[p!]
\includegraphics[width=\textwidth]{fig2}
\caption{caption2}
\end{figure*}
\clearpage
\begin{figure*}[p!]
\includegraphics[width=\textwidth]{fig3}
\caption{caption3}
\end{figure*}
\clearpage
\begin{figure*}[p!]
\includegraphics[width=\textwidth]{fig4}
\caption{caption4}
\end{figure*}
\clearpage} % end of scope of \afterpage directive
% ... more document material
\end{document}