
答案1
如果elsarticle
該類別載入了任何選項,則文字區塊的預設寬度為 345pt=12.125cm。堅持設定width=17cm
只會得到一個 4.875 公分太寬的圖形。不相信我?查看日誌文件,您會在其中找到一條警告,指出某些 \hbox138.69684pt
太寬。快速計算驗證了這一點138.69684pt=4.875cm
。
怎麼辦?做我已經在評論中建議的事情,即替換
\includegraphics[width=17cm,height=20cm,keepaspectratio]{Figs/f}
和
\includegraphics[width=\textwidth,height=0.95\textheight,keepaspectratio]{Figs/f}
為什麼height=0.95\textheight
而不是說height=1\textheight
?這是因為你需要為標題預留一些空間。
完整的 MWE(最小工作範例):
\documentclass[demo]{elsarticle} % remove 'demo' option in real document
\usepackage{graphicx}
\begin{document}
\begin{figure}[p]
\centering
\includegraphics[width=\textwidth,
height=0.95\textheight, % leave space for caption
keepaspectratio]%
{Figs/f}
\caption{Caption.}
\label{Fig:7x} % always place \label after, not before, \caption
\end{figure}
\end{document}