如何控制 LaTeX 中图形的位置?

如何控制 LaTeX 中图形的位置?

我有 10 个数字。我想将 8 个放在一页上,将其余两个放在下一页上。我使用的代码

    \begin{figure}[t]
 \centering
 \setlength{\unitlength}{0.1\textwidth}
\begin{picture}(5,3.5)



 \put(2.5,-0.5){$t$}
\put(-1,0){\includegraphics[width=0.40\textwidth]{fig1.eps}}
\put(4,0){\includegraphics[width=0.40\textwidth]{fig2.eps}}
 \put(-1,-4){\includegraphics[width=0.40\textwidth]{fig3.eps}}
    \put(4,-4){\includegraphics[width=0.40\textwidth]{fig4.eps}}
     \put(-1,-8){\includegraphics[width=0.40\textwidth]{fig5.eps}}
        \put(4,-8){\includegraphics[width=0.40\textwidth]{fig6.eps}}
         \put(-1,-12){\includegraphics[width=0.40\textwidth]{fig7.eps}}
            \put(4,-12){\includegraphics[width=0.40\textwidth]{fig8.eps}}

\end{picture}


\end{figure}



 \begin{figure}[t]
 \centering
 \setlength{\unitlength}{0.1\textwidth}
    \begin{picture}(5,3.5)



 \put(2.5,-0.5){$t$}
\put(-1,0){\includegraphics[width=0.40\textwidth]{fig9.eps}}
\put(4,0){\includegraphics[width=0.40\textwidth]{fig10.eps}}
\end{picture}
\caption{abc}
 \label{figures}
\end{figure}

问题是最后两个数字没有粘贴到下一页,而是与第一页的数字重叠。如何控制?

答案1

您的负坐标指定了叠印,在第一个图中的每个 y 坐标上添加 12 可以使布局更合理。

这似乎是一个简单的矩形网格,因此您实际上并不需要图片环境\put,只需列出\includegraphics它们就会自然地导致它们以 2 个为一行进行布局。

\documentclass{article}
\usepackage{graphicx}
\begin{document}
    \begin{figure}[t]
 \centering
 \setlength{\unitlength}{0.1\textwidth}
\begin{picture}(5,12)



 \put(2.5,11.5){$t$}
\put(-1,12){\includegraphics[width=0.40\textwidth]{example-image}}
\put(4,12){\includegraphics[width=0.40\textwidth]{example-image}}
 \put(-1,8){\includegraphics[width=0.40\textwidth]{example-image}}
    \put(4,8){\includegraphics[width=0.40\textwidth]{example-image}}
     \put(-1,4){\includegraphics[width=0.40\textwidth]{example-image}}
        \put(4,4){\includegraphics[width=0.40\textwidth]{example-image}}
         \put(-1,0){\includegraphics[width=0.40\textwidth]{example-image}}
            \put(4,0){\includegraphics[width=0.40\textwidth]{example-image}}

\end{picture}


\end{figure}



 \begin{figure}[t]
 \centering
 \setlength{\unitlength}{0.1\textwidth}
    \begin{picture}(5,3.5)



 \put(2.5,-0.5){$t$}
\put(-1,0){\includegraphics[width=0.40\textwidth]{example-image}}
\put(4,0){\includegraphics[width=0.40\textwidth]{example-image}}
\end{picture}
\caption{abc}
 \label{figures}
\end{figure}

\end{document}

相关内容