Re: [問題] 圖片放在中央
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}
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
2
5
LaTeX 近期熱門文章
PTT數位生活區 即時熱門文章