我正在研究LaTeX的背面。我正在使用IEEE访问模板,这是两列。我必须在一个列中修复我的表。我必须把桌子固定在它的位置。我为此使用过\FloatBarrier
。 \FloatBarrier
已将桌子固定在其位置上,但桌子上覆盖了文字。我已经应用了所有的技术,比如使用Table*
,!htbp
,\FloatBarrier
等等。我将非常感谢解决这个问题。
\FloatBarrier
\begin{table}[!htbp]
\caption{Car Database}
\label{table:Car_DB}
\begin{tabular}{ccccc}
\toprule
\textbf{Car\_ID} & \textbf{Car\_Name} & \textbf{Car\_Number} &\textbf{Owner\_Name} &\textbf{Owner\_ID} \\
\midrule
C1 &Suzuki Mehran &RIZ 3725 &Bilal Khalid &34512-4520645-5\\
C2 &mazda &MN 3909 &Usman Bhatti &32103-9963008-2\\
C2 &Toyotta Carolla &LEL 06 4520 &Ali Haider &12345-1529307-7\\
\bottomrule
\end{tabular}
\end{table}
我建议减少列标题,因为你的\caption
已经提到的项目将与相关/代表汽车。也就是说,删除Car
前缀。然后你还可以减少每列之间插入的\tabcolsep
\setlength{\tabcolsep}{0.7\tabcolsep}
上面的命令将\tabcolsep
减少了30%。这是最终结果的显示:
\documentclass{IEEEtran}
\usepackage{lipsum,booktabs}
\begin{document}
\begin{table}
\caption{Car Database}
\begin{tabular}{ccccc}
\toprule
\textbf{Car\_ID} & \textbf{Car\_Name} & \textbf{Car\_Number} &\textbf{Owner\_Name} &\textbf{Owner\_ID} \\
\midrule
C1 & Suzuki Mehran & RIZ 3725 & Bilal Khalid & 34512-4520645-5 \\
C2 & Mazda & MN 3909 & Usman Bhatti & 32103-9963008-2 \\
C3 & Toyotta Carolla & LEL 06 4520 & Ali Haider & 12345-1529307-7 \\
\bottomrule
\end{tabular}
\end{table}
\begin{table}
\caption{Car Database}
\setlength{\tabcolsep}{0.7\tabcolsep}% Shrink \tabcolsep by 30%
\centering
\begin{tabular}{ *{5}{c} }
\toprule
\textbf{ID} & \textbf{Name} & \textbf{Number} & \textbf{Owner name} & \textbf{Owner ID} \\
\midrule
C1 & Suzuki Mehran & RIZ 3725 & Bilal Khalid & 34512-4520645-5 \\
C2 & Mazda & MN 3909 & Usman Bhatti & 32103-9963008-2 \\
C3 & Toyotta Carolla & LEL 06 4520 & Ali Haider & 12345-1529307-7 \\
\bottomrule
\end{tabular}
\end{table}
\sloppy % Just for this example
\lipsum[1]
\end{document}