最近用latex 写论文碰到的问题,感觉之前也用到过一行多个表格,好像就是直接用的 minipage 但是这一次用 minipage 不行了,他是一列往下排列的。这个坑有必要记录下解决的方法。
网上一般有两种解决方法,第一种是用 floatrow 这个包,这个能用,但是有个问题,导致我其他的表格还有图片的标题也浮动了,实在是难顶 (我也没有找到很好的解决方法)
第二种方法就是 minipage 我先直接上代码
\begin{table}[!t]
\centering
\begin{minipage}{0.3\textwidth}
\centering
\small
\makeatletter\def\@captype{table}\makeatother
\caption{}
\label{}
\begin{tabular}{cc}
\end{tabular}
\end{minipage}\quad
\begin{minipage}{0.3\textwidth}
\centering
\small
\makeatletter\def\@captype{table}\makeatother
\caption{}
\label{}
\begin{tabular}{ccc}
\end{tabular}
\end{minipage}\quad
\begin{minipage}{0.3\textwidth}
\centering
\small
\makeatletter\def\@captype{table}\makeatother
\caption{}
\label{}
\begin{tabular}{cc}
\end{tabular}
\end{minipage}
\vspace{-15pt}
\end{table}
注意,里面的 minipage 之间 不要空行!!!
如果有空行就变成换行了
其实就是这么简单个问题找了半天,所以记录下吧,网上也有好多人没找到这个问题的