4
\begin{table*}    
\begin{center}   
\caption{Comparison of existing methods using infrared array sensor.}   
\begin{tabular}{c c c c c c c} \\ \toprule         
{Study} & {IR sensor (resolution)} & {No. of sensors} & {Position of the sensor} & {Methods} & {Accuracy} & {limitations} \\ \hline        
Mashiyama et al.\cite{Mashiyama_2014} & $8 \times 8$ & 1 & Ceiling & SVM & above 94\% & Very limited activity in small area, no transition of activity detection \\ \midrule        
Mashiyama et al.\cite{Mashiyama_2015_2} & $8\times 8$ & 1 & Ceiling & k-NN & 94\% & Less-effective feature extraction methods  \\ \midrule        
Kobayashi et al\cite{Kobayashi_2018} & $8\times 8$ & 2 & Ceiling, Wall & SVM & above 90\% & Particular positions difficult to differentiate the activity due reactive pixels \\ \midrule      
Xiyui  et al.\cite{Fan_2017} & $8\times 8$ & 1 & Wall & LSTM, GRU & 75\% and 85\% & Very limited perform only in parallel and perpendicular to the sensor     \\ \midrule        
Taniguchi et al.\cite{Taniguchi_2014} & $16\times 16$ & 2 & Ceiling, Wall & Time series analysis & 72\% & Old approach less accuracy \\ \midrule        
Taramasco et al.\cite{Taramasco_2018}& $1\times 16$ & 2 & Opposite corner of the room & LSTM, GRU, Bi-LSTM & 93\% & Its highly computation cost to implement to the devices  \\\bottomrule           
\end{tabular}\label{tabular_1}    
\end{center}
\end{table*}

The table in the following image is somewhat close to what I'm looking to achieve.

enter image description here

0
5

You need to allow line breaks in all seven columns, but the c column type doesn't allow that. I suggest you load the tabularx package and set up versions of the package's X column type that allow to vary the relative column widths. Observe that in the example below, the relative widths of the 7 columns adds up to 7. I would also use fewer \midrule directives; in fact, most of them can be replaced with \addlinespace.

enter image description here

\documentclass{article}  % choose a suitable document class
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably
\usepackage{booktabs,tabularx,ragged2e}
\newcolumntype{C}[1]{>{\Centering\hspace{0pt}\hsize=#1\hsize}X}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}\hsize=#1\hsize}X}

\begin{document}

\begin{table}     
\setlength\tabcolsep{4pt}
\caption{Comparison of existing methods using infrared array sensor.}   
\label{tab:comparison}
\begin{tabularx}{\textwidth}{@{} L{0.9} C{0.9}C{0.55}C{0.9}C{0.9}C{0.8} L{2.05} @{}} \\ 
\toprule         
Study & IR sensor (resolution) & No.\ of sensors & Position of sensor & Methods & Accuracy & Limitations \\ \midrule        
Mashiyama et al.\cite{Mashiyama_2014} & $8 \times 8$ & 1 & Ceiling & SVM & above 94\% & Very limited activity in small area, no transition of activity detection \\ 
\addlinespace %\midrule        
Mashiyama et al.\cite{Mashiyama_2015_2} & $8\times 8$ & 1 & Ceiling & k-NN & 94\% & Less-effective feature extraction methods  \\ 
\addlinespace %\midrule        
Kobayashi et al\cite{Kobayashi_2018} & $8\times 8$ & 2 & Ceiling, Wall & SVM & above 90\% & Particular positions difficult to differentiate the activity due reactive pixels \\ 
\addlinespace %\midrule      
Xiyui  et al.\cite{Fan_2017} & $8\times 8$ & 1 & Wall & LSTM, GRU & 75\% and 85\% & Very limited perform only in parallel and perpendicular to the sensor \\ 
\addlinespace %\midrule        
Taniguchi et al.\cite{Taniguchi_2014} & $16\times 16$ & 2 & Ceiling, Wall & Time series analysis & 72\% & Old approach less accuracy \\ 
\addlinespace %\midrule        
Taramasco et al.\cite{Taramasco_2018}& $1\times 16$ & 2 & Opposite corner of the room & LSTM, GRU, Bi-LSTM & 93\% & Its highly computation cost to implement to the devices  \\ 
\bottomrule           
\end{tabularx}    
\end{table}

\end{document}
4
  • ! Package mdwtab Error: Unknown tabular' preamble character L'. I am getting this error when I use tabularx I walways get mdwtab package error. can u help me with this Feb 21 at 5:51
  • Thank you its worked Feb 21 at 5:57
  • @MuthukumarK.A. - if you insist on using mdwtab -- a package which hasn't been updated in more than 20 [!] years -- then that's a crucial piece of information which you really ought to mention in the body of your query. mdwtab is known to conflict with quite a few other, more modern, packages. Please explain why you want to use mdwtab.
    – Mico
    Feb 21 at 6:33
  • 1
    mdwtab and tabularx are compatible. @Mico answer work fine also with loaded mdwtab` packages. But having mdwtab packages, you can use its rules \hlx[1pt]{hv} for \toprule, \hlx{vhv} for \midrule and ``\hlx[1pt]{hv}` for bottom rule. Result is slightly different as with booktabs rules.
    – Zarko
    Feb 21 at 8:29
2

With use of the mdwtab package as supplement to nice @Mico answer (+1):

\documentclass[twocolumn]{article}  % choose a suitable document class
\usepackage[a4paper,margin=2.5cm]{geometry} % set page parameters suitably
\usepackage{ragged2e}
\usepackage{mdwtab,tabularx} % <---
\newcolumntype{C}[1]{>{\Centering\hspace{0pt}\hsize=#1\hsize}X}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}\hsize=#1\hsize}X}
\usepackage{stfloats}
\usepackage{lipsum}
\begin{document}
    \begin{table*}[b]
\caption{Comparison of existing methods using infrared array sensor.}
\label{tabular_1}
    \centering
    \setlength\tabcolsep{4pt}
\begin{tabularx}{\linewidth}{@{} L{0.9} C{0.9}C{0.55}C{0.9}C{0.9}C{0.8} L{2.05} @{}}
    \hlx[1pt]{hv}       % <---
{Study} & {IR sensor (resolution)} & {No. of sensors} & {Position of the sensor} & {Methods} & {Accuracy} & {limitations} \\
    \hlx[0.5pt]{vhv}    % <---
Mashiyama et al.\cite{Mashiyama_2014} & $8 \times 8$ & 1 & Ceiling & SVM & above 94\% & Very limited activity in small area, no transition of activity detection \\
    \hlx{vhv}           % <---
Mashiyama et al.\cite{Mashiyama_2015_2} & $8\times 8$ & 1 & Ceiling & k-NN & 94\% & Less-effective feature extraction methods  \\
    \hlx{vhv}
Kobayashi et al\cite{Kobayashi_2018} & $8\times 8$ & 2 & Ceiling, Wall & SVM & above 90\% & Particular positions difficult to differentiate the activity due reactive pixels \\
    \hlx{vhv}
Xiyui  et al.\cite{Fan_2017} & $8\times 8$ & 1 & Wall & LSTM, GRU & 75\% and 85\% & Very limited perform only in parallel and perpendicular to the sensor     \\
    \hlx{vhv}
Taniguchi et al.\cite{Taniguchi_2014} & $16\times 16$ & 2 & Ceiling, Wall & Time series analysis & 72\% & Old approach less accuracy \\
        \hlx{vhv}
Taramasco et al.\cite{Taramasco_2018}& $1\times 16$ & 2 & Opposite corner of the room & LSTM, GRU, Bi-LSTM & 93\% & Its highly computation cost to implement to the devices  \\
    \hlx[1pt]{vh}       % <---
\end{tabularx}
    \end{table*}
\lipsum
\end{document}

enter image description here

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