LaTeX 中使两张表格并排

 

在使用 LaTeX写论文或者画海报的时候,希望两张较小的表格可以并排,(一般情况的LaTeX插入两张图片是上下布局的)

查找了一下,相关的例子如下:

\begin{minipage}{\textwidth}
 \begin{minipage}[t]{0.45\textwidth}
  \centering
     \makeatletter\def\@captype{table}\makeatother\caption{表格标题1}
       \begin{tabular}{cccc} 
    表格内容
    \end{tabular}
  \end{minipage}
  \begin{minipage}[t]{0.45\textwidth}
   \centering
        \makeatletter\def\@captype{table}\makeatother\caption{表格标题2}
         \begin{tabular}{cccc}        
          表格内容
      \end{tabular}
   \end{minipage}
\end{minipage}

 

\begin{minipage}{\textwidth}
        \begin{minipage}[t]{0.45\textwidth}
            \centering
            \makeatletter\def\@captype{table}\makeatother\caption{title1}
            \begin{tabular}{ccc}
\hline
n  & L  & $L+n$ \\ \hline
0  & 1  & 1 \\
1  & 3  & 4 \\
2  & 5  & 7 \\
3  & 7  & 10\\
4  & 9  & 13 \\
5  & 11 & 16 \\
6  & 13 & 19\\
7  & 15 & 22 \\
8  & 17 & 25 \\
9  & 19 & 28\\
10 & 21 & 31 \\
11 & 23 & 34\\
12 & 25 & 37 \\
13 & 27 & 40  \\
14 & 29 & 43  \\
15 & 31 & 46  \\
16 & 33 & 49  \\
17 & 35 & 52\\
\hline
\end{tabular}
        \end{minipage}
        \begin{minipage}[t]{0.45\textwidth}
        \centering
        \makeatletter\def\@captype{table}\makeatother\caption{title2}
            \begin{tabular}{ccc}
\hline
n  & L  & $L+n$ \\ \hline
0  & 1  & 1 \\
1  & 3  & 4 \\
2  & 5  & 7 \\
3  & 7  & 10\\
4  & 9  & 13 \\
5  & 11 & 16 \\
6  & 13 & 19\\
7  & 15 & 22 \\
8  & 17 & 25 \\
9  & 19 & 28\\
10 & 21 & 31 \\
11 & 23 & 34\\
12 & 25 & 37 \\
13 & 27 & 40  \\
14 & 29 & 43  \\
15 & 31 & 46  \\
16 & 33 & 49  \\
17 & 35 & 52\\
\hline
\end{tabular}
        \end{minipage}
    \end{minipage}

 

 

【Reference】

1、关于Latex并排两张表格的解决方案

 

转载于:https://www.cnblogs.com/shenxiaolin/p/10323731.html

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值