在将简单表格转换为超级制表器时,编译器持续工作了很长时间。经过调查,我发现 \tabcolsep into p{} 可能是问题所在... 你们能向我解释一下为什么会出现这种情况吗?也许这也是一个坏习惯,所以告诉我其他原因。
提前致谢!
梅威瑟:
\documentclass{article}
\usepackage{supertabular, booktabs}
%%These packaged should not interfer imo but I let them in case it has something to do with my problem
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage{array} %% Array m option in particular (center and sized)
\usepackage{diagbox} %% Array diagonal box
\usepackage{multirow} %for multi row in table
\begin{document}
\begin{center}
\tablefirsthead{%
\toprule{}
AI/ML Models & Prediction & Optimisation/ Automation & Analysis & Modelling/
Simulation \\
\midrule{}
}
\tablehead{%
%\hline\multicolumn{4}{|l|}{\small\sl continued from previous page}\\
\toprule{}
AI/ML Models & Prediction & Optimisation/ Automation & Analysis & Modelling/
Simulation \\
\midrule{}
}
\tabletail{%
\bottomrule{}
}
\tablelasttail{%
\bottomrule{}
}
%%Notworking
%\begin{supertabular}{@{}p{0.20\textwidth-\tabcolsep}p{0.22\textwidth-2\tabcolsep}p{0.20\textwidth-2\tabcolsep}p{0.18\textwidth-2\tabcolsep}p{0.20\textwidth-\tabcolsep}@{}}
%%Working
\begin{supertabular}{@{}p{0.20\textwidth}|r@{\hspace{5.5mm}}|r|r|r|}
1 & 1 & 1 & 1 \\
2 & 4 & 16 & 2 \\
3 & 9 & 81 & 6 \\
4 & 16 & 256 & 24 \\
[5mm]...19 & 361 & 130321 & 1.21645100E+17\\
20 & 400 & 160000 & 2.43290200E+18\\
\end{supertabular}
\end{center}
\end{document}
编辑:
感谢 David Carlisle 和这个帖子,我更新了第一个 MWE 如下:
\documentclass{article}
\usepackage{supertabular, booktabs}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage{array} %% Array m option in particular (center and sized)
\usepackage{diagbox} %% Array diagonal box
\usepackage{multirow} %for multi row in table
\begin{document}
\begin{center}
\tablefirsthead{%
\toprule{}
AI/ML Models & Prediction & Optimisation/ Automation & Analysis & Modelling/
Simulation \\ \midrule{} \\
}
\tablehead{%
%\hline\multicolumn{4}{|l|}{\small\sl continued from previous page}\\
\toprule{}
AI/ML Models & Prediction & Optimisation/ Automation & Analysis & Modelling/
Simulation \\ \midrule{} \\
}
\tabletail{%
\bottomrule{}
\multicolumn{5}{}{\small continued on next page} \\
\bottomrule{} \\
}
\tablelasttail{%
\bottomrule{} \\
}
\tablecaption{Publication Distribution with the Design Space}
\label{tab: designSpace}
\begin{supertabular}{@{}p{\dimexpr 0.20\textwidth-\tabcolsep \relax}p{\dimexpr 0.22\textwidth-2\tabcolsep \relax}p{\dimexpr 0.20\textwidth-2\tabcolsep \relax}p{\dimexpr 0.18\textwidth-2\tabcolsep \relax}p{\dimexpr 0.20\textwidth-\tabcolsep\relax }@{}}
%\begin{supertabular}{lllll}
%\endhead
Multi-Agent System (MAS)
&
&
&
&
\\
Evolutionary Algorithm (EA)
&
&
&
& \\
Simulated Annealing (SA)
&
&
&
& \\
Tabu search
&
&
&
& \\
Particle Swarm Optimisation
&
&
&
& \\
Ant Colony Algorithm
&
&
&
& \\
Bee Colony Algorithm
&
&
&
& \\
Neural Network (NN)
&
&
&
& \\
Deep Deterministic Policy Gradient (DDPG)
&
&
&
& \\
Convolutional Neural Networks (CNN)
&
&
&
& \\
Deep Q-Network (DQN)
&
&
&
& \\
Deep Learning
&
&
&
& \\
Autoencoder
&
&
&
& \\
Random Forest (RF)
&
&
&
& \\
Quantile Regression Forest
&
&
&
& \\
Gradient Boosting Machine (GBM)
&
&
&
& \\
Support Vector Machine (SVM)
&
&
&
& \\
Decision Tree
&
&
&
& \\
Fuzzy Logic
&
&
&
& \\
Linear Regression
&
&
&
& \\
Linear Functional Regression
&
&
&
& \\
Linear Discriminant Analysis (LDA)
&
&
&
& \\
Quadratic Discriminant Analysis (QDA)
&
&
&
& \\
Logistic regression
&
&
&
& \\
Binary logistic regression models
&
&
&
& \\
Gaussian Mixture Model
&
&
&
& \\
Bayesian Network
&
&
&
& \\
Recursive Bayesian estimation
&
&
&
& \\
k-nearest neighbor (k-NN)
&
&
&
&\\
Genetic algorithm
&
&
&
& \\
Hierarchical clustering
&
&
&
& \\
Dynamic Bayesian Belief Network
&
&
&
& \\
BIRCH
&
&
&
& \\
DBSCAN
&
&
&
& \\
OPTIC
&
&
&
& \\
K-means
&
&
&
& \\
Non Negative Matrix Factorisation (NMF)
&
&
&
& \\
A*
&
&
&
& \\
Multi-Layer Perceptron (MLP)
&
&
&
& \\
Deep Reinforcement Learning
&
&
&
& \\
Recurrent neural network \& LSTM
&
&
&
& \\
Reinforcement Learning
&
&
&
& \\
k-nearest neighbours (kNN)
&
&
&
& \\
Principal Component Analysis (PCA)
&
&
&
& \\
OPTICS clustering
&
&
&
& \\
Not referenced
&
&
&
& \\
\end{supertabular}
\end{center}
\end{document}
答案1
您有两个错误,这里缺少c
列规范
\multicolumn{5}{}{\small continued on next page}
{}
以及之后的伪君子\toprule
和朋友们。
运行没有错误。
\documentclass{article}
\usepackage{supertabular, booktabs}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\usepackage{array} %% Array m option in particular (center and sized)
\usepackage{diagbox} %% Array diagonal box
\usepackage{multirow} %for multi row in table
\begin{document}
\begin{center}
\tablefirsthead{%
\toprule
AI/ML Models & Prediction & Optimisation/ Automation & Analysis & Modelling/
Simulation \\ \midrule \\
}
\tablehead{%
%\hline\multicolumn{4}{|l|}{\small\sl continued from previous page}\\
\toprule
AI/ML Models & Prediction & Optimisation/ Automation & Analysis & Modelling/
Simulation \\ \midrule \\
}
\tabletail{%
\bottomrule
\multicolumn{5}{c}{\small continued on next page} \\
\bottomrule \\
}
\tablelasttail{%
\bottomrule \\
}
\tablecaption{Publication Distribution with the Design Space}
\label{tab: designSpace}
\begin{supertabular}{@{}p{\dimexpr 0.20\textwidth-\tabcolsep \relax}p{\dimexpr 0.22\textwidth-2\tabcolsep \relax}p{\dimexpr 0.20\textwidth-2\tabcolsep \relax}p{\dimexpr 0.18\textwidth-2\tabcolsep \relax}p{\dimexpr 0.20\textwidth-\tabcolsep\relax }@{}}
%\begin{supertabular}{lllll}
%\endhead
Multi-Agent System (MAS)
&
&
&
&
\\
Evolutionary Algorithm (EA)
&
&
&
& \\
Simulated Annealing (SA)
&
&
&
& \\
Tabu search
&
&
&
& \\
Particle Swarm Optimisation
&
&
&
& \\
Ant Colony Algorithm
&
&
&
& \\
Bee Colony Algorithm
&
&
&
& \\
Neural Network (NN)
&
&
&
& \\
Deep Deterministic Policy Gradient (DDPG)
&
&
&
& \\
Convolutional Neural Networks (CNN)
&
&
&
& \\
Deep Q-Network (DQN)
&
&
&
& \\
Deep Learning
&
&
&
& \\
Autoencoder
&
&
&
& \\
Random Forest (RF)
&
&
&
& \\
Quantile Regression Forest
&
&
&
& \\
Gradient Boosting Machine (GBM)
&
&
&
& \\
Support Vector Machine (SVM)
&
&
&
& \\
Decision Tree
&
&
&
& \\
Fuzzy Logic
&
&
&
& \\
Linear Regression
&
&
&
& \\
Linear Functional Regression
&
&
&
& \\
Linear Discriminant Analysis (LDA)
&
&
&
& \\
Quadratic Discriminant Analysis (QDA)
&
&
&
& \\
Logistic regression
&
&
&
& \\
Binary logistic regression models
&
&
&
& \\
Gaussian Mixture Model
&
&
&
& \\
Bayesian Network
&
&
&
& \\
Recursive Bayesian estimation
&
&
&
& \\
k-nearest neighbor (k-NN)
&
&
&
&\\
Genetic algorithm
&
&
&
& \\
Hierarchical clustering
&
&
&
& \\
Dynamic Bayesian Belief Network
&
&
&
& \\
BIRCH
&
&
&
& \\
DBSCAN
&
&
&
& \\
OPTIC
&
&
&
& \\
K-means
&
&
&
& \\
Non Negative Matrix Factorisation (NMF)
&
&
&
& \\
A*
&
&
&
& \\
Multi-Layer Perceptron (MLP)
&
&
&
& \\
Deep Reinforcement Learning
&
&
&
& \\
Recurrent neural network \& LSTM
&
&
&
& \\
Reinforcement Learning
&
&
&
& \\
k-nearest neighbours (kNN)
&
&
&
& \\
Principal Component Analysis (PCA)
&
&
&
& \\
OPTICS clustering
&
&
&
& \\
Not referenced
&
&
&
& \\
\end{supertabular}
\end{center}
\end{document}