现在我的表格在底部,标题也在底部
\begin{minipage}[b]{0.6\textwidth}
\centering
\includegraphics[width=1\linewidth]{../matlab/SCEP_mcep_compare/graphs/diff_qos_types_thoughput}
\captionof{figure}{A table beside a figure}\label{diff_qos_types_thoughput}
\end{minipage}
\hfill
\begin{minipage}[b][][c]{0.4\textwidth}
\centering
\renewcommand{\arraystretch}{1}
\begin{tabular}{| c | c | c | c |}
\hline
$\lambda$ & Qos2 & Qos1 & Qos0 \\ \hline
10 & 10 & 10 & 10 \\
50 & 49.50 & 42.00 & 22.54 \\
200 & 85.00 & 42.00 & 91.10 \\
500 & 86.00 & 42.00 & 233.11 \\
1000 & 88.00 & 42.00 & 233.11 \\
1500 & 87 & 42.00 & 707.06 \\
2000 & 86.00 & 42.00 & 947.90 \\
3000 & 82.00 & 42.00 & 961.64 \\
\hline
\end{tabular}
\captionof{table}{Values for \cref{diff_qos_types_thoughput} }
\end{minipage}f{table}{Values for \cref{diff_qos_types_thoughput} }
\end{minipage}
为了实现中心的表格内容,我尝试使用\begin{minipage}[b][][c]{0.4\textwidth}
如下方法这里,但输出结果相同。
如何将表格置于中央,而将表格标题置于底部?
答案1
像这样?
\documentclass{article}
\usepackage{booktabs}
\usepackage{caption}
\usepackage[export]{adjustbox} % for set image baseline to its center
\usepackage{cleveref}
\begin{document}
\begin{figure}
\begin{tabular}{p{\dimexpr0.6\linewidth-2\tabcolsep}
p{\dimexpr0.4\linewidth-2\tabcolsep}}
\includegraphics[width=1\linewidth,valign=c]{example-image-duck}
&
\begin{tabular}{c c c c}
\toprule
$\lambda$ & Qos0 & Qos1 & Qos2 \\
\midrule
30 & 28.276 & 20 & 39 \\
40 & 29.889 & 20 & 39 \\
50 & 31.766 & 20 & 39 \\
60 & 37.274 & 20 & 39 \\
68 & 48.673 & 20 & 39 \\
\bottomrule
\end{tabular} \tabularnewline
\caption{A figure beside of \cref{tab:diff_qos_types_thoughput}
\label{fig:diff_qos_types_thoughput}
&
\captionof{table}{Values for \cref{fig:diff_qos_types_thoughput} }
\label{tab:diff_qos_types_thoughput}
\end{tabular}
\end{figure}
\end{document}