如何在報表文件類別中將影像的標題放置在影像本身下方

如何在報表文件類別中將影像的標題放置在影像本身下方

我怎樣才能使標題結束在圖像下方?

\documentclass[12pt]{report}
\usepackage{graphicx}

\begin{document}
\begin{figure}[h!]
\includegraphics[scale= 0.3]{images/MRS.jpg}
\caption{A part of an MRS.}
\label{fig:MRS}
\end{figure} 
\end{document}

答案1

凱爾,我的建議非常有效:

在此輸入影像描述

上圖是透過以下方式產生的:

\documentclass[12pt]{report}
\usepackage{graphicx}

\begin{document}
\begin{figure}[h!]\centering
\includegraphics[scale= 0.3]{example-image}
\caption{A part of an MRS.}
\label{fig:MRS}
\end{figure}
\end{document}

如果您的真實影像沒有發生這種情況,則它的左側或右側有空白區域。要看到這一點,為了測試放置\includegraphics{...} into\framebox{...}`:

\documentclass[12pt]{report}
\usepackage{graphicx}

\begin{document}
\begin{figure}[h!]\centering
\framebox{\includegraphics[scale= 0.3]{images/MRS.jpg}}
\caption{A part of an MRS.}
\label{fig:MRS}
\end{figure}
\end{document}

如果是範例圖像(提供套件graphicx),您將得到:

在此輸入影像描述

相關內容