我尝试使用乳胶中的“ \documentclass[prodmode,acmcsur]{acmsmall}”来运行以下表格代码,但存在两个问题。
- 由于单元格颜色重叠,边框不显示。如何显示边框?
- 字幕文本的宽度非常小。如何才能将字幕文本显示在一行中?
请尽快回复我。
\begin{center}
\begin{table}[]
\centering
\caption{Table IV. Comparison of different tools with respect to features}
\label{my-label}
\begin{tabular}{
>{\columncolor[HTML]{009901}}l ll
>{\columncolor[HTML]{FCFF2F}}l ll
>{\columncolor[HTML]{FE0000}}l l}
{\color[HTML]{F8A102} } & exist & & {\color[HTML]{FCFF2F} } & uncertain & & & not exist
\end{tabular}
\begin{tabular}{|p{135pt}|p{34pt}|p{48pt}|}
\hline
\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright }}
& \multicolumn{1}{|l|}{\parbox{34pt}{\raggedright Atom}}
& \multicolumn{1}{|l|}{\parbox{48pt}{\raggedright Clock}} \\
\hline
\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright Additional information in node text}}
& \multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{34pt}{\raggedright }}
& \multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{48pt}{\raggedright }} \\
\hline
\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright Tool tips}}
& \multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{34pt}{\raggedright }}
& \multicolumn{1}{>{\columncolor[HTML]{FF0000}}l|}{\parbox{48pt}{\raggedright \textcolor[HTML]{000000}{}}} \\
\hline
\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright Hyper link with other view
}}
& \multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{34pt}{\raggedright }}
& \multicolumn{1}{|>{\columncolor[HTML]{FFFF00}}l|}{\parbox{48pt}{\raggedright }} \\
\hline
\end{tabular}
\end{table}
\end{center}
答案1
根据您的 pdf 查看器,您可能需要放大才能看到线条,但您的标记似乎过于复杂,我在这里重现了大部分注释掉的标记。
\documentclass{article}
\usepackage[table]{xcolor}
\newcolumntype{R}{>{\raggedright\arraybackslash}p}
\begin{document}
%no\begin{center}
\begin{table}%no[]
\centering
\caption{%
%no Table IV.
Comparison of different tools with respect to features}
\label{my-label}
\begin{tabular}{
>{\columncolor[HTML]{009901}}l ll
>{\columncolor[HTML]{FCFF2F}}l ll
>{\columncolor[HTML]{FE0000}}l l}
{\color[HTML]{F8A102} } & exist & & {\color[HTML]{FCFF2F} } & uncertain & & & not exist
\end{tabular}
%\begin{tabular}{|p{135pt}|p{34pt}|p{48pt}|}
\begin{tabular}{|R{135pt}|R{34pt}|R{48pt}|}
\hline
%\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright }}
&
% \multicolumn{1}{|l|}{\parbox{34pt}{\raggedright
Atom
%}}
&
%\multicolumn{1}{|l|}{\parbox{48pt}{\raggedright
Clock
%}}
\\
\hline
%\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright
Additional information in node text
%}}
&
%\multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{34pt}{\raggedright }}
\cellcolor[HTML]{92D050}
&
%\multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{48pt}{\raggedright }}
\cellcolor[HTML]{92D050}
\\
\hline
%\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright
Tool tips
%}}
&
%\multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{34pt}{\raggedright }}
\cellcolor[HTML]{92D050}
&
%\multicolumn{1}{>{\columncolor[HTML]{FF0000}}l|}{\parbox{48pt}{\raggedright \textcolor[HTML]{000000}{}}}
\cellcolor[HTML]{FF0000}
\\
\hline
%\multicolumn{1}{|l|}{\parbox{130pt}{\raggedright
Hyper link with other view
%}}
&
%\multicolumn{1}{|>{\columncolor[HTML]{92D050}}l|}{\parbox{34pt}{\raggedright }}
\cellcolor[HTML]{92D050}
&
%\multicolumn{1}{|>{\columncolor[HTML]{FFFF00}}l|}{\parbox{48pt}{\raggedright }} \\
\cellcolor[HTML]{FFFF00}
\\
\hline
\end{tabular}
\end{table}
%no\end{center}
\end{document}