1

I am trying to run the following tabular code by using using "\documentclass[prodmode,acmcsur]{acmsmall}" in latex which have two problems.

  1. Border is not shown due to the overlapping of cell colors. How can I show the borders?
  2. Caption text is shown in a very small width. How can I show the caption text in a single line?

Please reply me as soon as possible.

\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}

enter link description here

3
  • 1
    Welcome to TeX.SX! 1. is likely a viewer issue, try zooming in on your PDF. The caption is not this narrow by default, so there must be something somewhere else in your code setting the width. Please turn your snippet into a minimal working example (MWE). Other comments: Remove the center environment around the table, most likely the table will float away anyway. And don't number the tables manually, in your screenshot you can see it says Table III. Table IV. because you've written Table IV in the caption. Nov 17 '15 at 8:36
  • 2
    why are you doing \caption{Table IV. which makes the caption come out as table III Table IV ?? the caption width is not set in the code you show so we can not comment on that please fix your example to be a complete small document that reproduces the problem. Nov 17 '15 at 10:22
  • don't do & \multicolumn{1}{|l|}{\parbox{48pt}{\raggedright Clock}} just do & Clock the column is already a p column of that width. Nov 17 '15 at 10:23
2

Depending on your pdf viewer, you may have to zoom in to see the lines, but also your markup seems excessively complicated, I reproduce here with most of the markup commented out.

enter image description here

\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}
2
  • Thanks sir for your reply. I am actually using "\documentclass[prodmode,acmcsur]{acmsmall}", which are still producing same issues. Can you please reply me how to resolve it? Nov 17 '15 at 15:18
  • @MuhammadHammad edit your question to have a small, complete document as in my answer that reproduces the problem. If you are getting a narrow caption you have some code you have not shown to make it narrow it is not possible for anyone to fix code that has not been shown. Nov 17 '15 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.