无法管理表格维度,请帮忙

无法管理表格维度,请帮忙

我需要在表格中容纳大量数据。我尝试使用不同的方法(侧向/旋转框/调整框等),但未能在一页内实现所需的结果。源 MSword 表格如下所示。

\documentclass[final,1p,12pt]{elsarticle}
%Packages for Rotatebox
\usepackage[graphicx]{realboxes}
\usepackage{adjustbox}
\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{}
\setcellgapes{3pt}  % <--- new
\usepackage{siunitx}
\begin{document}
\begin{table}[]
\begin{tabular}{|l|l|l|l|l|l|l|l|}
\hline
Ref.No & Dataset                                                                                                                                                                                                             & Sensors Used                                                                & Variant of   Devices & Important   features                                                                                                                                                                                                                                                                                                                                     & Techniques                                                                                                & Accuracy                                                            & Drawback                                                                                                                                                                                                                                                   \\ \hline
       & \begin{tabular}[c]{@{}l@{}}UCI-HAR dataset \\ with  30 subjects\end{tabular}                                                                                                                                        & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Gyroscope\end{tabular}         & 1                    & \begin{tabular}[c]{@{}l@{}}Combining two classifiers \\ for different need for the process\\  to make a hybrid system RF \\ used to distinguish between stating \\ \& moving activities where \\ 1D CNN used for decision making.\end{tabular}                                                                                                           & \begin{tabular}[c]{@{}l@{}}Hybrid method of \\ 1D CNN \& SVM\end{tabular}                                 & 97.66\%                                                             & \begin{tabular}[c]{@{}l@{}}The model has performed \\ on existing available dataset \\ with default activities. \\ If anything new has came \\ then there is no consideration for that.\end{tabular}                                                       \\ \hline
       & \begin{tabular}[c]{@{}l@{}}Raw Data collected \\ with 14 users\end{tabular}                                                                                                                                         & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Gyroscope\end{tabular}         & 1                    & \begin{tabular}[c]{@{}l@{}}The gait data were recorded  \\ before and after the volunteer \\ consumes alcohol. The mobile \\ application use is ‘Physical Toolbox \\ Sensor Suite’ for android and IOS. \\    \\ Alcohol  Breath Tester has been used. \\ The data taken when blood Alcohol \\ Concentration (BAC) of them reaches 0.05 \%.\end{tabular} & DNN                                                                                                       & 79\%                                                                & \begin{tabular}[c]{@{}l@{}}In this study while collecting \\ data one single device used \\ and also it is just placed at the \\ right legs of the subject. \\ No position change has done.\end{tabular}                                                   \\ \hline
       & \begin{tabular}[c]{@{}l@{}}Raw data of 252 gait \\ data collected from 42 subjects .\end{tabular}                                                                                                                   & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Gyroscope, camera\end{tabular} & 1                    & \begin{tabular}[c]{@{}l@{}}Histogram features of multi-level \\ local pattern (MLP) and local binary \\ pattern (LBP) has been used for capturing \\ the local variations of estimated curvatures. \\ Then SVM and Bagging method has been used.\end{tabular}                                                                                            & \begin{tabular}[c]{@{}l@{}}SVM\\    \\ Bagging\end{tabular}                                               & 76.83\%                                                             & \begin{tabular}[c]{@{}l@{}}They have evaluate and \\ test the model with only \\ 252 instances which is relatively less.\end{tabular}                                                                                                                      \\ \hline
       & \begin{tabular}[c]{@{}l@{}}Smartphones Data Set, \\ available at the UCI Machine \\ Learning Repository with 30 instances\end{tabular}                                                                              & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Gyroscope\end{tabular}         & 1                    & \begin{tabular}[c]{@{}l@{}}Using and modifying Gaussian \\ Mixture Model Universal \\ Background Model (GMM-UBM) \\ gait based person identification \\ has done with a public dataset.  \\ Also introduce new \\ feature extraction schemes.\end{tabular}                                                                                               & \begin{tabular}[c]{@{}l@{}}Gaussian Mixture \\ Model-Universal Background \\ Model (GMM-UBM)\end{tabular} & 90\%                                                                & \begin{tabular}[c]{@{}l@{}}The have tested data on \\ enrolled users-though this \\ method 34\% error rate in \\ enrolled users also.\end{tabular}                                                                                                         \\ \hline
       & \begin{tabular}[c]{@{}l@{}}Three datasets are used - \\ CASIA-B (124 Subject \& 110 sequences),   \\ OU-ISIR (4007 Subjects \& 2 sequences) and \\ USF gait dataset ( 122 subject   and 5 covariates).\end{tabular} & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Gyroscope\end{tabular}         & 1                    & \begin{tabular}[c]{@{}l@{}}Three datasets and 3 networks- \\ Local @ Bottom (LB), Mid-Level @ Top (MT) \\ and Compact Mid-Level \&Top (CMT) \\ are compared.\end{tabular}                                                                                                                                                                                & Deep CNN                                                                                                  & 91\%                                                                & \begin{tabular}[c]{@{}l@{}}While using 5-fold cross \\ validation techniques subjects \\ re randomly divided into 5 parts. \\ The average identification accuracy \\ and their deviations are reported. \\ Which may leads to more failures.\end{tabular}  \\ \hline
       & Raw dataset with 11 volunteers                                                                                                                                                                                      & Accelerometer                                                               & 1                    & \begin{tabular}[c]{@{}l@{}}Phone is placed at the back \\ of the user vertically.  \\ Accelerometer records \\ acceleration force up to ±2g. \\ Sampling   rate fixed 27Hz.\end{tabular}                                                                                                                                                                 & \begin{tabular}[c]{@{}l@{}}Dynamic Time   \\ Warping\\    \\ SVM\end{tabular}                             & \begin{tabular}[c]{@{}l@{}}79\%\\    \\  \\    \\ 86\%\end{tabular} & \begin{tabular}[c]{@{}l@{}}Only one single \\ (Google Android HTC Nexus one)\\ device has taken for data collection \\ and also only one fixed position of \\ placing the device has considered.\end{tabular}                                              \\ \hline
       & \begin{tabular}[c]{@{}l@{}}Raw dataset with 32 male \\ subjects and 28 female subjects\end{tabular}                                                                                                                 & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Camera\end{tabular}            & 1                    & \begin{tabular}[c]{@{}l@{}}An innovative walking \\ procedure with three types \\ of fusion strategies are \\ used-voting rule, weighted \\ voting rule and Bayes \\ combination rule.\end{tabular}                                                                                                                                                      & SVM                                                                                                       & 86\%                                                                & \begin{tabular}[c]{@{}l@{}}Though the experiment done \\ on raw dataset, they performance \\ evaluation done with existing dataset \\ CASIA.  Also when data has been \\ taken no skin depth has considered. \\ No video has been considered.\end{tabular} \\ \hline
       & \begin{tabular}[c]{@{}l@{}}Raw data collected with \\ 6 Users(3 Male, 3 Female)\end{tabular}                                                                                                                        & \begin{tabular}[c]{@{}l@{}}Accelerometer, \\ Gyroscope\end{tabular}         & 4                    & \begin{tabular}[c]{@{}l@{}}\textbackslash{}begin\{itemize\}\\ \textbackslash{}item \\ \textbackslash{}item\\ \textbackslash{}item\\ \textbackslash{}end\{itemsize\}\end{tabular}                                                                                                                                                                         & \begin{tabular}[c]{@{}l@{}}DT\\    \\ KNN\\    \\ SVM\\    \\ LR\end{tabular}                             & 99\%                                                                &                                                                                                                                                                                                                                                            \\ \hline
\end{tabular}
\end{table}

\end{document} 

来源

答案1

您标记了这个 longtable(用于多页表)但似乎您想将其压缩到一页中。

只需选择合适的字体大小和列宽,然后删除所有嵌套的表格。

如果您可以删除页码,那么您就可以从页脚和页首窃取空间。

在此处输入图片描述

\documentclass[final,1p,12pt]{elsarticle}
%Packages for Rotatebox
\usepackage[graphicx]{realboxes}
\usepackage{adjustbox}
\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{}
\setcellgapes{3pt}  % <--- new
\usepackage{siunitx}
\begin{document}

\begin{sidewaystable}%no[]
%\tiny too small
% \footnotesize too big?
\fontsize{8pt}{9pt}\selectfont
\setlength\tabcolsep{2pt}
\begin{tabular}{@{}
              |l|
              >{\raggedright\arraybackslash}p{3.5cm}|
              >{\raggedright\arraybackslash}p{2.5cm}|
              >{\raggedright\arraybackslash}p{1.5cm}|
              >{\raggedright\arraybackslash}p{5.5cm}|
              >{\raggedright\arraybackslash}p{2cm}|
              l|>{\raggedright\arraybackslash}p{5cm}|
              @{}}
\hline
Ref.No & Dataset                                                                                                                                                                                                             & Sensors Used                                                                & Variant of   Devices & Important   features                                                                                                                                                                                                                                                                                                                                     & Techniques                                                                                                & Accuracy                                                            & Drawback                                                                                                                                                                                                                                                    \\ \hline
       & UCI-HAR dataset  with  30 subjects                                                                                                                                        & Accelerometer,  Gyroscope         & 1                    & Combining two classifiers  for different need for the process  to make a hybrid system RF  used to distinguish between stating  \& moving activities where  1D CNN used for decision making.                                                                                                           & Hybrid method of  1D CNN \& SVM                                 & 97.66\%                                                             & The model has performed  on existing available dataset  with default activities.  If anything new has came  then there is no consideration for that.                                                        \\ \hline
       & Raw Data collected  with 14 users                                                                                                                                         & Accelerometer,  Gyroscope         & 1                    & The gait data were recorded   before and after the volunteer  consumes alcohol. The mobile  application use is ‘Physical Toolbox  Sensor Suite’ for android and IOS.      Alcohol  Breath Tester has been used.  The data taken when blood Alcohol  Concentration (BAC) of them reaches 0.05 \%. & DNN                                                                                                       & 79\%                                                                & In this study while collecting  data one single device used  and also it is just placed at the  right legs of the subject.  No position change has done.                                                    \\ \hline
       & Raw data of 252 gait  data collected from 42 subjects .                                                                                                                   & Accelerometer,  Gyroscope, camera & 1                    & Histogram features of multi-level  local pattern (MLP) and local binary  pattern (LBP) has been used for capturing  the local variations of estimated curvatures.  Then SVM and Bagging method has been used.                                                                                            & SVM     Bagging                                               & 76.83\%                                                             & They have evaluate and  test the model with only  252 instances which is relatively less.                                                                                                                       \\ \hline
       & Smart\-phones Data Set,  available at the UCI Machine  Learning Repository with 30 instances                                                                              & Accelerometer,  Gyroscope         & 1                    & Using and modifying Gaussian  Mixture Model Universal  Background Model (GMM-UBM)  gait based person identification  has done with a public dataset.   Also introduce new  feature extraction schemes.                                                                                               & Gaussian Mixture  Model-Universal Background  Model (GMM-UBM) & 90\%                                                                & The have tested data on  enrolled users-though this  method 34\% error rate in  enrolled users also.                                                                                                          \\ \hline
       & Three datasets are used -  CASIA-B (124 Subject \& 110 sequences),    OU-ISIR (4007 Subjects \& 2 sequences) and  USF gait dataset ( 122 subject   and 5 covariates). & Accelerometer,  Gyroscope         & 1                    & Three datasets and 3 networks-  Local @ Bottom (LB), Mid-Level @ Top (MT)  and Compact Mid-Level \&Top (CMT)  are compared.                                                                                                                                                                                & Deep CNN                                                                                                  & 91\%                                                                & While using 5-fold cross  validation techniques subjects  re randomly divided into 5 parts.  The average identification accuracy  and their deviations are reported.  Which may leads to more failures.   \\ \hline
       & Raw dataset with 11 volunteers                                                                                                                                                                                      & Accelerometer                                                               & 1                    & Phone is placed at the back  of the user vertically.   Accelerometer records  acceleration force up to ±2g.  Sampling   rate fixed 27Hz.                                                                                                                                                                 & Dynamic Time    Warping     SVM                             & 79\%           86\% & Only one single  (Google Android HTC Nexus one) device has taken for data collection  and also only one fixed position of  placing the device has considered.                                               \\ \hline
       & Raw dataset with 32 male  subjects and 28 female subjects                                                                                                                 & Accelerometer,  Camera            & 1                    & An innovative walking  procedure with three types  of fusion strategies are  used-voting rule, weighted  voting rule and Bayes  combination rule.                                                                                                                                                      & SVM                                                                                                       & 86\%                                                                & Though the experiment done  on raw dataset, they performance  evaluation done with existing dataset  CASIA.  Also when data has been  taken no skin depth has considered.  No video has been considered.  \\ \hline
       & Raw data collected with  6 Users(3 Male, 3 Female)                                                                                                                        & Accelerometer,  Gyroscope         & 4                    & \textbackslash{}begin\{itemize\} \textbackslash{}item  \textbackslash{}item \textbackslash{}item \textbackslash{}end\{itemsize\}                                                                                                                                                                         & DT     KNN     SVM     LR                             & 99\%                                                                &                                                                                                                                                                                                                                                             \\ \hline
\end{tabular}\hspace{-3cm}
\end{sidewaystable}

\end{document} 

答案2

我的主要建议是不要手动插入换行符。相反,使用xltabular环境并让 LaTeX 完成查找换行符的繁琐工作。

以下示例xltabularlandscape环境中使用环境。即便如此,表格也跨越了四页 [4!]。我强烈建议您在描述中少写一点。

顺便问一下,如果“参考编号”列中的每个单元格都是空白的,那么该列的用途是什么?

以下屏幕截图显示了四页表的第一页和最后一页。


在此处输入图片描述


在此处输入图片描述


\documentclass[final,1p,12pt]{elsarticle}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{booktabs}
\usepackage{xltabular} % for 'xltabular' env.
\usepackage{ragged2e}  % for '\RaggedRight' and '\Centering' macros
\newcolumntype{L}[1]{% variable width X-type col., raggedright
   >{\RaggedRight\hspace{0pt}\hsize=#1\hsize}X}
\newcolumntype{C}[1]{% variable width X-type col., centered
   >{\Centering\hspace{0pt}\hsize=#1\hsize}X}
\usepackage{pdflscape} % for 'landscape' env.

\hyphenation{accel-er-om-eter gyro-scope}
\begin{document}

\begin{landscape}
\setlength\tabcolsep{3pt} % default value: 6pt
\noindent
\begin{xltabular}{562pt}{@{} 
    % sum of relative col. widths = 8 = number of L-type columns
    L{0.4} L{1.2} L{0.8} C{0.8} L{2.1} L{0.6} C{0.6} L{1.5} @{}}
\toprule
Ref. No & 
Dataset & 
Sensors Used & 
Variant of Devices & 
Important features & 
Techniques & 
Accuracy & 
Drawback \\
\midrule
\endhead

& 
UCI-HAR dataset with 30 subjects & 
Accelerometer, Gyroscope & 
1 & 
Combining two classifiers for different need for the process to make a hybrid system RF used to distinguish between stating \& moving activities where 1D CNN used for decision making. & 
Hybrid method of 1D CNN \& SVM & 
97.66\% & 
The model has performed on existing available dataset with default activities. If anything new has came then there is no consideration for that. \\
\midrule
& 
Raw Data collected with 14 users & 
Accelerometer, Gyroscope & 1 & The gait data were recorded before and after the volunteer consumes alcohol. The mobile application use is `Physical Toolbox Sensor Suite' for android and IOS. \newline Alcohol Breath Tester has been used. The data taken when blood Alcohol Concentration (BAC) of them reaches 0.05~\%. & 
DNN & 
79\% & 
In this study while collecting data one single device used and also it is just placed at the right legs of the subject. No position change has done. \\
\midrule 
& 
Raw data of 252 gait data collected from 42 subjects . & 
Accelerometer, Gyroscope, camera & 
1 & Histogram features of multi-level local pattern (MLP) and local binary pattern (LBP) has been used for capturing the local variations of estimated curvatures. Then SVM and Bagging method has been used. & 
SVM \newline Bagging & 
76.83\% & 
They have evaluate and test the model with only 252 instances which is relatively less. \\ 
\midrule 
& 
Smartphones Data Set, available at the UCI Machine Learning Repository with 30 instances & 
Accelerometer, Gyroscope & 
1 & 
Using and modifying Gaussian Mixture Model Universal Background Model (GMM-UBM) gait based person identification has done with a public dataset. Also introduce new feature extraction schemes. & 
Gaussian Mixture Model-Universal Background Model (GMM-UBM) & 
90\% & 
The have tested data on enrolled users, though this method 34\% error rate in enrolled users also. \\ 
\midrule
& Three datasets are used -- CASIA-B (124 Subject \& 110 sequences), OU-ISIR (4007 Subjects \& 2 sequences) and USF gait dataset (122 subject and 5 covariates). & 
Accelerometer, Gyroscope & 
1 & 
Three datasets and 3 networks -- Local @ Bottom (LB), Mid-Level @ Top (MT) and Compact Mid-Level \& Top (CMT) are compared. & 
Deep CNN & 
91\% & While using 5-fold cross validation techniques subjects are randomly divided into 5 parts. The average identification accuracy and their deviations are reported. Which may leads to more failures. \\ 
\midrule
& 
Raw dataset with 11 volunteers & 
Accelerometer & 
1 & 
Phone is placed at the back of the user vertically. Accelerometer records acceleration force up to ±2g. Sampling rate fixed 27Hz. & 
Dynamic Time Warping \newline SVM & 
79\% \newline 86\% & 
Only one single (Google Android HTC Nexus one) device has taken for data collection and also only one fixed position of placing the device has considered. \\ 
\midrule
& 
Raw dataset with 32 male subjects and 28 female subjects & 
Accelerometer, Camera & 
1 & 
An innovative walking procedure with three types of fusion strategies are used -- voting rule, weighted voting rule and Bayes combination rule. & 
SVM & 
86\% & 
Though the experiment done on raw dataset, they performance evaluation done with existing dataset CASIA\@. Also when data has been taken no skin depth has considered. No video has been considered. \\ 
\midrule
& 
Raw data collected with 6 Users (3 Male, 3 Female) & 
Accelerometer, Gyroscope & 
4 & 
\ttfamily
\string\begin\{itemize\} \newline \string\item \newline \string\item \newline \string\item\ \newline \string\end\{itemize\} & 
DT \newline KNN \newline SVM \newline LR & 
99\% 
& 
\\
\bottomrule
\end{xltabular}
\end{landscape}

\end{document} 

相关内容