Re: [問題] 圖片放在中央

看板LaTeX (論文排版)作者時間12年前 (2013/06/05 13:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
The \newpage \pagebreak command won't work as expected, \clearpage, which has the same effect, is preferred because it suppresses floating objects to migrate. To see this fact, try \newpage or \pagebreak instead \documentclass[a4paper]{article} % methods for vertically center an image % \newpage won't work but \clearpage works % Thus floats can move to new page \usepackage[margin=2cm]{geometry} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \vspace*{\fill} \centering \includegraphics[width=0.4\textwidth, height=0.4\textheight]{figA} \vspace*{\fill} \end{figure} \clearpage % try \newpage or \pagebreak \begin{figure} \centering \includegraphics[width=0.4\textwidth, height=0.4\textheight]{figB} \end{figure} \clearpage % try \breakpage or \newpage \begin{figure} \vfil \centering \includegraphics[width=0.4\textwidth, height=0.4\textheight]{figC} \vfil \end{figure} \end{document}
文章代碼(AID): #1HhirIue (LaTeX)
文章代碼(AID): #1HhirIue (LaTeX)