在使用 LaTeX写论文或者画海报的时候,希望两张较小的表格可以并排,(一般情况的LaTeX插入两张图片是上下布局的)
查找了一下,相关的例子如下:
1\begin{minipage}{\textwidth} 2 \begin{minipage}[t]{0.45\textwidth} 3 \centering 4 \makeatletter\def\@captype{table}\makeatother\caption{表格标题1} 5 \begin{tabular}{cccc} 6 表格内容 7 \end{tabular} 8 \end{minipage} 9 \begin{minipage}[t]{0.45\textwidth} 10 \centering 11 \makeatletter\def\@captype{table}\makeatother\caption{表格标题2} 12 \begin{tabular}{cccc} 13 表格内容 14 \end{tabular} 15 \end{minipage} 16\end{minipage} 17 18\begin{minipage}{\textwidth} 19 \begin{minipage}[t]{0.45\textwidth} 20 \centering 21 \makeatletter\def\@captype{table}\makeatother\caption{title1} 22 \begin{tabular}{ccc} 23\hline 24n & L & $L+n$ \\ \hline 250 & 1 & 1 \\ 261 & 3 & 4 \\ 272 & 5 & 7 \\ 283 & 7 & 10\\ 294 & 9 & 13 \\ 305 & 11 & 16 \\ 316 & 13 & 19\\ 327 & 15 & 22 \\ 338 & 17 & 25 \\ 349 & 19 & 28\\ 3510 & 21 & 31 \\ 3611 & 23 & 34\\ 3712 & 25 & 37 \\ 3813 & 27 & 40 \\ 3914 & 29 & 43 \\ 4015 & 31 & 46 \\ 4116 & 33 & 49 \\ 4217 & 35 & 52\\ 43\hline 44\end{tabular} 45 \end{minipage} 46 \begin{minipage}[t]{0.45\textwidth} 47 \centering 48 \makeatletter\def\@captype{table}\makeatother\caption{title2} 49 \begin{tabular}{ccc} 50\hline 51n & L & $L+n$ \\ \hline 520 & 1 & 1 \\ 531 & 3 & 4 \\ 542 & 5 & 7 \\ 553 & 7 & 10\\ 564 & 9 & 13 \\ 575 & 11 & 16 \\ 586 & 13 & 19\\ 597 & 15 & 22 \\ 608 & 17 & 25 \\ 619 & 19 & 28\\ 6210 & 21 & 31 \\ 6311 & 23 & 34\\ 6412 & 25 & 37 \\ 6513 & 27 & 40 \\ 6614 & 29 & 43 \\ 6715 & 31 & 46 \\ 6816 & 33 & 49 \\ 6917 & 35 & 52\\ 70\hline 71\end{tabular} 72 \end{minipage} 73 \end{minipage}
【Reference】