1

I am getting this error Missing number, treated as zero. > l.31 >{\arraybackslash}p{1.5in}}

My MWC is (Using springer aps journal class)

\documentclass[pdflatex, sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%%% Standard Packages
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[misc]{ifsym}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{siunitx}
%%<additional latex packages if required can be included here>
\usepackage{amsmath}
\usepackage{graphicx}
%\graphicspath{{./images/}}
%Table packages
\usepackage{booktabs, makecell, multirow, tabularx}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\renewcommand{\theadfont}{\bfseries}
\renewcommand{\theadfont}{\footnotesize\bfseries}
\renewcommand\theadgape{}

\begin{document}

%%%BIG TABLE BEGIN
\begin{sidewaystable}
\begin{center}
\begin{minipage}{\textheight}
%\small
\caption{Comparative study on some Fall Detection Systems~[TB-Threshold and ML-Machine Learning based]}
\label{tab:1}       % Give a unique label
\begin{tabular*}{>{\raggedright\arraybackslash}p{0.60in}  % changed to tabular and first column
        >{\raggedright\arraybackslash}p{0.85in}
        >{\raggedright\arraybackslash}p{1.1in} % increase width
        c
        >{\raggedright\arraybackslash}p{0.65in}
        c
        c
        >{\raggedright\arraybackslash}p{1.5in}
        >{\arraybackslash}p{1.5in}} 
    \toprule
    \thead{Reference}&\thead{Sensor\\type}& \bfseries Sensor location&\thead{No. of\\ sensors}&\thead{Processing\\location}&\thead{Method}&\thead{Accuracy\\in \%}&\thead{Features}&\thead{Limitations}\\
    \midrule\\

    \cite{Wang2018}
    & Accelerometer, Gyroscope
    & External & $>1$ & On board & TB & 77.5
    & Fine grained fall detection with good accuracy.
    & No text based location, Fall and break of device aspect not considered.\\
    \addlinespace

    \cite{Abdulaziz2021}
    & Triaxial Accelerometer
    & External & 1 & On board and Remote
    & TB+ML & 99.45
    &Killer heuristic optimized AlexNet convolution neural network(KHANCN). Sensor information is initially collected by placing 6 sensors on 14 subjects.
    &Fall location and time not available. No real life implementation case study. Fall and break aspect not considered.\\
    \addlinespace

   \cite{Tsinganos2017}
    & Triaxial Accelerometer
    & External & $>1$ & On board and remote
    & ML & 91.83
    &Fall detection and ADL based on KNN classifier\%
    &Store \& analyse, no live data, device fall is not considered.\\
    \addlinespace

    \cite{Boudouane2019}
    &Camera
    & External & $>1$ & Remote
    & ML & 68.33
    & Image information is used for fall classification.
    &Slow, multiple image capturing device may be required, privacy issues.\\
    \addlinespace

    \cite{Junior2018}
    & Triaxial Accelerometer
    & External & $>1$ & Remote
    & TB + ML & Unknown
    & Threshold analysis, reminder analysis and decision tree algorithm .
    & The non-functional aspect of the device after a fall is not considered.\\
    \addlinespace

    \cite{Silva2018}
    & Pressure Sensor
    &Integrated in the operator's shoe & $>1$ & remote
    & TB & 86
    & Good result accuracy and can be implemented in IoT platform.
    & The nature of walking surface has a direct impact on the accuracy.\\
    \addlinespace

    \cite{lee2018real}
    & Accelerometer, Gyroscope
    &Smartphone in chest pocket & $>1$ & On board and remote
    & TB & 92.5
    & Smartphone Google API (location), Good accuracy.
    & Device location is not suitable for heart patient, Google API is not accurate in remote locations.\\
    \addlinespace

    \cite{Tong2013}
    & MEMS tri-axis accelerometer
    &Upper trunk of the body & 1 & Remote
    & ML & 100
    & Fall detection and prediction using hidden Markov chain.
    & Location information as well as fall alike cases are not considered.\\
    \addlinespace

    \cite{Ruan2015}
    & UHF-RFID
    &Different locations inside the room & $>1$ & Remote
    &TB + ML & 92.45
    & Device and location independent fine grained fall detection.
    & Not suitable for outdoor monitoring.\\
    \addlinespace

    Proposed system
    & Smartphone accelerometer
    &Gender and garment independent, easy to wear phone holder & 1 & Remote
    &TB & 94.45
    & \multicolumn{2}{p{\dimexpr1.5in+1.5in+2\tabcolsep+\arrayrulewidth}}{
        Text based location + SMS, Indoor and outdoor monitoring, Ineffectual device consideration, Non ambulatory, Non self-recovery warning only so number of warnings are less, In real life, the system could reduce the FoF in the PD patients upto 10\%.}  \\
    \bottomrule

\end{tabular*}
\end{minipage}
\end{center}
\end{sidewaystable}
%%%BIG TABLE END 
\end{document} 

The template can be Downloaded

1
  • 2
    \begin{tabular*} needs a width argument, for example \begin{tabular*}{\textwidth} Commented Jan 25, 2022 at 6:56

2 Answers 2

1

Your table has many isssues:

  • using tabular* you should define table width, as say @Pieter van Oostrum in his comment. However you can simply stick with tabular table.
  • your table is to big that in form, as is presented in question, can be fit in one page. For resolve this, try:
    • reduce used font size
    • reduce \tabcolsep
    • reduce columns widths
  • for the last column you need to determine text alignment in cells
  • you not need to enclose table in minipage
  • instead of center environment rather use command \centering

Posible solution for table can be:

\documentclass[pdflatex, sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%%% Standard Packages
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[misc]{ifsym}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{siunitx}
%%<additional latex packages if required can be included here>
\usepackage{amsmath}
\usepackage{graphicx}
%\graphicspath{{./images/}}
%Table packages
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\usepackage{booktabs, makecell, multirow, tabularx}
\renewcommand{\theadfont}{\footnotesize\bfseries}
\renewcommand\theadgape{}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\newcolumntype{P}[1]{>{\raggedright\arraybackslash}p{#1}}

\begin{document}

%%%BIG TABLE BEGIN
\begin{sidewaystable}
\footnotesize
\setlength\tabcolsep{4pt}
\centering
\caption{Comparative study on some Fall Detection Systems~[TB-Threshold and ML-Machine Learning based]}
\label{tab:1}       % Give a unique label
\begin{tabular}{@{} P{0.40in}P{0.8in}P{0.85in} 
                    c
                    P{0.65in}
                    c c
                    P{1.2in} P{1.2in}
                @{}}
    \toprule
\thead[b]{Ref.}
    & \thead[b]{Sensor\\type}
        & \thead[b]{Sensor\\ location}
            & \thead[b]{No. of\\ sensors}
                & \thead[b]{Processing\\location}
                    & \thead[b]{Method}
                         & \thead[b]{Accuracy\\in \%}
                            & \thead[b]{Features}
                                & \thead[b]{Limitations}       \\
    \midrule
\cite{Wang2018}
    & Accelerometer, Gyroscope
    & External & $>1$ & On board & TB & 77.5
    & Fine grained fall detection with good accuracy.
    & No text based location, Fall and break of device aspect not considered.\\
    \addlinespace

\cite{Abdulaziz2021}
    & Triaxial Accelerometer
    & External & 1 & On board and Remote
    & TB+ML & 99.45
    &Killer heuristic optimized AlexNet convolution neural network(KHANCN). Sensor information is initially collected by placing 6 sensors on 14 subjects.
    &Fall location and time not available. No real life implementation case study. Fall and break aspect not considered.\\
    \addlinespace

\cite{Tsinganos2017}
    & Triaxial Accelerometer
    & External & $>1$ & On board and remote
    & ML & 91.83
    &Fall detection and ADL based on KNN classifier\%
    &Store \& analyse, no live data, device fall is not considered.\\
    \addlinespace

\cite{Boudouane2019}
    &Camera
    & External & $>1$ & Remote
    & ML & 68.33
    & Image information is used for fall classification.
    &Slow, multiple image capturing device may be required, privacy issues.\\
    \addlinespace

\cite{Junior2018}
    & Triaxial Accelerometer
    & External & $>1$ & Remote
    & TB + ML & Unknown
    & Threshold analysis, reminder analysis and decision tree algorithm .
    & The non-functional aspect of the device after a fall is not considered.\\
\addlinespace

\cite{Silva2018}
    & Pressure Sensor
    &Integrated in the operator's shoe & $>1$ & remote
    & TB & 86
    & Good result accuracy and can be implemented in IoT platform.
    & The nature of walking surface has a direct impact on the accuracy.\\
    \addlinespace

\cite{lee2018real}
    & Accelerometer, Gyroscope
    &Smartphone in chest pocket & $>1$ & On board and remote
    & TB & 92.5
    & Smartphone Google API (location), Good accuracy.
    & Device location is not suitable for heart patient, Google API is not accurate in remote locations.\\
    \addlinespace

\cite{Tong2013}
    & MEMS tri-axis accelerometer
    &Upper trunk of the body & 1 & Remote
    & ML & 100
    & Fall detection and prediction using hidden Markov chain.
    & Location information as well as fall alike cases are not considered.\\
    \addlinespace

\cite{Ruan2015}
    & UHF-RFID
    &Different locations inside the room & $>1$ & Remote
    &TB + ML & 92.45
    & Device and location independent fine grained fall detection.
    & Not suitable for outdoor monitoring.\\
    \addlinespace

Proposed system
    & Smartphone accelerometer
    &Gender and garment independent, easy to wear phone holder & 1 & Remote
    &TB & 94.45
    & \multicolumn{2}{p{\dimexpr2.4in+2\tabcolsep+\arrayrulewidth}}{
        Text based location + SMS, Indoor and outdoor monitoring, Ineffectual device consideration, Non ambulatory, Non self-recovery warning only so number of warnings are less, In real life, the system could reduce the FoF in the PD patients upto 10\%.}  \\
    \bottomrule
\end{tabular}
\end{sidewaystable}
%%%BIG TABLE END
\end{document} 

enter image description here

1
  • Thank you very much Zarko. You are always a life saver.
    – Bukaida
    Commented Jan 25, 2022 at 8:49
1

Here's a solution which (a) employs a tabularx environment, with the overall width set to \textwidth, (b) calculates the minimally required widths of colums 1, 2, 3, and 5 on the fly in order to maximize the widths of the final two columns, and (c) permits hyphenation of long words, if needed, thereby taking up less space overall.

enter image description here

\documentclass[sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%%% Standard Packages
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{comment}
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[misc]{ifsym}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{siunitx}

%% additional latex packages if required can be included here>
\usepackage{amsmath}
\usepackage{graphicx}

\usepackage{booktabs, makecell, multirow, tabularx}
\usepackage[figuresright]{rotating}
\setlength{\rotFPtop}{0pt plus 1fil}
\renewcommand{\theadfont}{\footnotesize}
\renewcommand\theadgape{}

% New:
\usepackage{ragged2e}  % for '\RaggedRight' macro
\usepackage{calc}      % for '\widthof' macro
\newcolumntype{P}[1]{>{\RaggedRight\hspace{0pt}}p{#1}}
\newcolumntype{L}{>{\RaggedRight}X}

\begin{document}

\begin{sidewaystable}
\footnotesize  % <-- new
\captionsetup{size=footnotesize} % <-- new
\setlength\tabcolsep{3pt} % default: 6pt
\caption{Comparative study on some Fall Detection Systems 
         [TB-Threshold and ML-Machine Learning based]}
\label{tab:1}    

\begin{tabularx}{\textwidth}{ @{} % <-- new
        P{\widthof{Proposed}}
        P{\widthof{Accelerometer,}}
        P{\widthof{Gender and garment,}}
        c
        P{\widthof{and remote}}
        c c
        L L @{} } 
    \toprule

    Ref.&
    \thead{Sensor\\type}& 
    \thead{Sensor\\location}&
    \thead{No.\ of\\sensors}&
    \thead{Processing\\location}&
    Method&
    \thead{Accuracy\\in \%}&
    Features&
    Limitations \\
    \midrule

    \cite{Wang2018}
    & Accelerometer, Gyroscope
    & External & $>1$ & On board & TB & 77.5
    & Fine grained fall detection with good accuracy.
    & No text based location, Fall and break of device aspect not considered.\\
    \addlinespace

    \cite{Abdulaziz2021}
    & Triaxial Accelerometer
    & External & 1 & On board and remote
    & TB+ML & 99.45
    & Killer heuristic optimized AlexNet convolution neural network(KHANCN)\@. 
      Sensor information is initially collected by placing 6 sensors on 14 subjects.
    & Fall location and time not available. No real life implementation 
      case study. Fall and break aspect not considered.\\
    \addlinespace

   \cite{Tsinganos2017}
    & Triaxial Accelerometer
    & External & $>1$ & On board and remote
    & ML & 91.83
    & Fall detection and ADL based on KNN classifier\%
    & Store \& analyse, no live data, device fall not considered.\\
    \addlinespace

    \cite{Boudouane2019}
    &Camera
    & External & $>1$ & Remote
    & ML & 68.33
    & Image information is used for fall classification.
    &Slow, multiple image capturing device may be required, privacy issues.\\
    \addlinespace

    \cite{Junior2018}
    & Triaxial Accelerometer
    & External & $>1$ & Remote
    & TB + ML & Unknown
    & Threshold analysis, reminder analysis and decision tree algorithm .
    & The non-functional aspect of the device after a fall is not considered.\\
    \addlinespace

    \cite{Silva2018}
    & Pressure Sensor
    &Integrated in the operator's shoe & $>1$ & remote
    & TB & 86
    & Good result accuracy and can be implemented in IoT platform.
    & The nature of walking surface has a direct impact on the accuracy.\\
    \addlinespace

    \cite{lee2018real}
    & Accelerometer, Gyroscope
    & Smartphone in chest pocket & $>1$ & On board and remote
    & TB & 92.5
    & Smartphone Google API (location), Good accuracy.
    & Device location is not suitable for heart patient, 
      Google API is not accurate in remote locations.\\
    \addlinespace

    \cite{Tong2013}
    & MEMS tri-axis accelerometer
    & Upper trunk of the body & 1 & Remote
    & ML & 100
    & Fall detection and prediction using hidden Markov chain.
    & Location information as well as fall alike cases are not considered.\\
    \addlinespace

    \cite{Ruan2015}
    & UHF-RFID
    & Different locations inside the room & $>1$ & Remote
    & TB + ML & 92.45
    & Device and location independent fine grained fall detection.
    & Not suitable for outdoor monitoring.\\
    \addlinespace

    Proposed system
    & Smartphone accelerometer
    & Gender and garment independent, easy to wear phone holder & 1 & Remote
    & TB & 94.45
    & \multicolumn{2}{>{\RaggedRight}p{3.1in}}{%
      Text based location + SMS, Indoor and outdoor monitoring, Ineffectual 
      device consideration, Non ambulatory, Non self-recovery warning only 
      so number of warnings are less, In real life, system could reduce FoF 
      in PD patients up to 10\%.}  \\

    \bottomrule

\end{tabularx}
\end{sidewaystable}

\end{document}
1
  • Thank you Mico.
    – Bukaida
    Commented Jan 25, 2022 at 11:44

You must log in to answer this question.

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