我使用\usepackage{float}
和\floatstyle{plaintop}
在顶部显示表格的标题。
但是,我的表格包含 4 张图片。对于该表格,我想显示下面的标题。有什么办法吗?
我当前的代码是:
\begin{table}
\begin{adjustwidth}{-1.3in}{-1.3in}% adjust the L and R margins by 1 inch
\centering
\begin{tabular}{cccc}
\includegraphics*[width=1.50in, height=1.20in, keepaspectratio=false]{./images/paper_2012_pixel_based_segmentation_important_regions} & \includegraphics*[width=1.50in, height=1.20in, keepaspectratio=false]{./images/paper_2012_FMO_2_MB_allocation_map} & \includegraphics*[width=1.50in, height=1.20in, keepaspectratio=false]{./images/paper_2012_corresponding_quantization_QPA_map} & \parbox[b]{1.5in}{\includegraphics*[width=1.49in, height=0.55in, keepaspectratio=false, valign=t]{./images/paper_2012_plaque_ROI_4CIF} \par \centering (d) \par \includegraphics*[width=1.49in, height=0.55in, keepaspectratio=false]{./images/paper_2012_plaque_ROI_4CIF_QP_28}}\\
(a) & (b) & (c) & (e) \\
\end{tabular}
\end{adjustwidth}
\captionof{figure}{position=bottom}[Atherosclerotic plaque ultrasound variable quality slice encoding]{Atherosclerotic plaque ultrasound variable quality slice encoding.}
\label{fig:Atherosclerotic_plaque_ultrasound_variable_quality_slice_encoding}
\end{table}
答案1
您可以使用figure
代替table
环境,这样您就不需要\captionof
但可以使用常规 caption 命令,如以下示例所示。正如评论中提到的,命令的位置caption
通常会影响输出中标题的位置。所以应该不需要 的floatrow
选项[position=bottom]
。
\documentclass{article}
\usepackage{float}
\floatstyle{plaintop}
\usepackage{changepage}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\begin{adjustwidth}{-1.3in}{-1.3in}
\centering
\begin{tabular}{cccc}
\includegraphics*[width=1.50in, height=1.20in, keepaspectratio=false]{example-image} &
\includegraphics*[width=1.50in, height=1.20in, keepaspectratio=false]{example-image} &
\includegraphics*[width=1.50in, height=1.20in, keepaspectratio=false]{example-image} &
\parbox[b]{1.5in}{\includegraphics*[width=1.49in, height=0.55in, keepaspectratio=false]{example-image} \par \centering (d) \par \includegraphics*[width=1.49in, height=0.55in, keepaspectratio=false]{example-image}}\\
(a) & (b) & (c) & (e) \\
\end{tabular}
\end{adjustwidth}
\caption[Atherosclerotic plaque ultrasound variable quality slice encoding]{Atherosclerotic plaque ultrasound variable quality slice encoding.}
\label{fig:Atherosclerotic_plaque_ultrasound_variable_quality_slice_encoding}
\end{figure}
\end{document}
尽管如此,我还是建议采用不同的方法来定位图像。在下面的例子中,我使用了包,subcaption
以便允许使用通常方法引用带有标题的子图label
ref
。
\documentclass{article}
\usepackage{float}
\floatstyle{plaintop}
\usepackage{changepage}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{adjustwidth}{-1.3in}{-1.3in}
\centering
\begin{subfigure}[b]{1.50in}
\centering
\includegraphics[width=1.50in]{example-image}
\caption{}\label{first-subfig}
\end{subfigure}%
\quad
\begin{subfigure}[b]{1.50in}
\centering
\includegraphics[width=1.50in]{example-image}
\caption{}
\end{subfigure}
\quad
\begin{subfigure}[b]{1.50in}
\centering
\includegraphics[width=1.50in]{example-image}
\caption{}
\end{subfigure}
\quad
\begin{subfigure}[b]{1.50in}
\centering
\includegraphics[width=1.50in,height=0.55in]{example-image}
\caption{}
\includegraphics[width=1.50in,height=0.55in]{example-image}
\caption{}
\end{subfigure}
\caption{Caption for all subfigures}
\end{adjustwidth}
\end{figure}
\ref{first-subfig}
\end{document}