Latex 中的表格问题?

Latex 中的表格问题?

目前,我正在处理一个乳胶文档,但不幸的是,使用表格生成器时表格顶部会出现黑色单元格。

\begin{table}[]
\centering
\caption{}
\label{tab:my-table}
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\rowcolor[HTML]{B6DBF4} 
\textbf{\begin{tabular}[c]{@{}c@{}}Time Shift\\ (hour)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}1.5 Rev V\\ (m/s)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}2.5 Rev V\\ (m/s)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}Time Shift\\ (hour)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}1.5 Rev V\\ (m/s)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}c@{}}2.5 Rev V\\ (m/s)\end{tabular}} \\ \hline
2                                                                    & 15.1                                                               & 4.2                                                                & -2                                                                   & 14.6                                                               & 3.9                                                                \\ \hline
4                                                                    & 31.1                                                               & 8.7                                                                & -4                                                                   & 27.2                                                               & 7.9                                                                \\ \hline
6                                                                    & 47.7                                                               & 14.1                                                               & -6                                                                   & 39.3                                                               & 12.6                                                               \\ \hline
8                                                                    & 66.9                                                               & 19.3                                                               & -8                                                                   & 53.9                                                               & 17.8                                                               \\ \hline
10                                                                   & 85.9                                                               & 24.9                                                               & -10                                                                  & 67.1                                                               & 22.3                                                               \\ \hline
18                                                                   & 224.4                                                              & 59.8                                                               & -18                                                                  & 113.1                                                              & 55.9                                                               \\ \hline
\end{tabular}
\end{table}

任何想法?在此处输入图片描述

UPDATE1:添加了表代码

答案1

我看不到:

...
\usepackage[table]{xcolor}
...

\begin{table}
\centering
\caption{,mn,mn,n}\label{tab:my-table}
\begin{tabular}{|c|c|c|c|c|c|}\hline
\rowcolor[HTML]{B6DBF4} 
    \bfseries\shortstack{Time Shift\\ (hour)} & 
    \bfseries\shortstack{1.5 Rev V\\ (m/s)} & 
    \bfseries\shortstack{2.5 Rev V\\ (m/s)} & 
    \bfseries\shortstack{Time Shift\\ (hour)} & 
    \bfseries\shortstack{1.5 Rev V\\ (m/s)} & 
    \bfseries\shortstack{2.5 Rev V\\ (m/s)} \\ \hline
 2 &    15.1 & 4.2  & -2 & 14.6 & 3.9 \\ \hline
 4 &    31.1 & 8.7  & -4 & 27.2 & 7.9 \\ \hline
\end{tabular}
\end{table}

在此处输入图片描述

相关内容