横向表格错误:缺少数字,视为零

横向表格错误:缺少数字,视为零

我收到此错误缺失数字,视为零。> l.31 >{\arraybackslash}p{1.5in}}

我的 MWC 是(使用 springer aps 期刊类别)

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

模板可以是已下载

答案1

您的表格存在许多问题:

  • tabular*应该定义表格宽度,正如@Pieter van Oostrum 在其评论中所说。但是,您可以简单地坚持使用tabular表格。
  • 您的表格太大,无法在一页中显示,如问题所示。要解决此问题,请尝试:
    • 减小使用的字体大小
    • 减少\tabcolsep
    • 减少列宽
  • 对于最后一列,您需要确定单元格中的文本对齐方式
  • 你不需要把表格括在minipage
  • 不要center使用环境,而要使用命令\centering

表格的可能解决方案可以是:

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

在此处输入图片描述

答案2

这里有一个解决方案,它 (a) 采用一个tabularx环境,将整体宽度设置为\textwidth,(b) 动态计算第 1、2、3 和 5 列所需的最小宽度,以最大化最后两列的宽度,以及 (c) 允许在需要时对长单词进行连字,从而总体上占用更少的空间。

在此处输入图片描述

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

相关内容