1

enter image description here

Hello guys, I notice that the space between each column of a table in LaTeX is not quite well (at least for me). Is there any way to set this? Attached image form is getting after running the following code. Please help to resolve that issue...I have to maintain the table in this format.. I am using Latex template for IOS Press journal. So i am using class of IOS..

\documentclass[aic]{iosart2x}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\begin{document}
\begin{table*}[htb]
\caption{Table caption} \label{tab:title}
\begin{tabular}{ll d{1} d{1}}
\hline
&\textbf{ABCD}&\multicolumn{1}{l}{$COV(\#/\%)$}&
\multicolumn{1}{l}{$DSC(\#/\%)$}\\
\hline
FLOPs&SDD-16                  &10,937M/91.3 &121.1M/8.7 \\
& DD                          &1,352M/92.0  & 117M/8.0\\ [6pt]
Storage&SDD-16                &7.15M/5.58   & 121.1M/94.42\\
& DD                          &2.3M/3.75    & 59M/96.25\\
\hline
\end{tabular}
\end{table*} 
\end{document}
6
  • 1
    Welcome to TeX.SX! You can highlight code in your post using back-ticks. To highlight code-blocks, either indent them by four spaces or use the {} on the gui. Also, can you please expand the code snippets that you have posted to a full minimal working example. It is much easier to help you you if we can start with some compilable code that illustrates your problem. A MWE should start with a \documentclass command, include any necessary packages and be as small as possible to demonstrate your problem.
    – user30471
    Aug 21, 2017 at 6:39
  • @Andrew I have edited the question in order to render the code correctly. Aug 21, 2017 at 6:40
  • 1
    @logo_writer Actually, if you had refreshed the post you would have seen that I'd already done this:). The OP still needs to expand the code to a full MWE so that it compiles.
    – user30471
    Aug 21, 2017 at 6:43
  • @Andrew This happens when more than one user is interested XD I spotted it after editing. My bad! :P Aug 21, 2017 at 6:46
  • I have written full version of code after editing. But, i am getting same problem when i used \documentclass{article}.. Aug 21, 2017 at 7:04

2 Answers 2

2

try

\documentclass[aic]{article}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{M}{M}{#1}} % <--- changed anchor, now is M

\begin{document}
\begin{table*}[htb]
\caption{Table caption} \label{tab:title}
\begin{tabular}{ll d{4} d{5}}
\hline
&\textbf{ABCD}&\multicolumn{1}{l}{$COV(\#/\%)$}&
\multicolumn{1}{l}{$DSC(\#/\%)$}\\
\hline
FLOPs&SDD-16                  &10,937M/91.3 &121.1M/8.7 \\
& DD                          &1,352M/92.0  & 117M/8.0\\ [6pt]
Storage&SDD-16                &7.15M/5.58   & 121.1M/94.42\\
& DD                          &2.3M/3.75    & 59M/96.25\\
\hline
\end{tabular}
\end{table*}
\end{document}

enter image description here

0
0
\documentclass[aic]{article}
\usepackage{dcolumn,booktabs}
\newcolumntype{d}[1]{D{/}{/}{#1}}
\begin{document}
\begin{table*}[h]
\caption{Table caption}
\centering
\begin{tabular}{ll d{5} d{5}}\toprule
&\textbf{ABCD}    & COV (\#/\%) & DSC(\#/\%)\\\midrule
FLOPs & SDD-16    & 10,937 M/91.3 & 121.1 M/8.7 \\
& DD              & 1,352 M/92.0  & 117 M/8.0\\\addlinespace
Storage & SDD-16  & 7.15 M/5.58   & 121.1 M/94.42\\
& DD              & 2.3 M/3.75    & 59 M/96.25\\\bottomrule
\end{tabular}
\end{table*} 
\end{document}

mwe

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .