1

我正在研究背页的 LaTeX。我正在使用两列的 IEEE 访问模板。我必须将我的表固定在一个列中。我必须把桌子修好。我已经用过\FloatBarrier这个了。\FloatBarrier已将表格固定在原位,但表格覆盖了文本。我已经应用了所有技术,例如 using 、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}

这段代码的结果是这样的

4

1 回答 1

1

我建议减少列标题,因为您\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}

My table提供的更多选项不适合;我有什么选择?

于 2018-11-13T16:48:54.893 回答