我正在使用模板由此杂志。当我将表格放置在覆盖 2 列(文本宽度)的位置时,table*
出现以下错误。
梅威瑟:
\documentclass[USenglish,twocolumn]{article}
\usepackage[utf8]{inputenc}%(only for the pdftex engine)
\usepackage[big]{dgruyter_author}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{tabularx}
\begin{document}
\articletype{Research Article{\hfill}Open Access}
\author*[1]{Corresponding Author}
\affil[1]{Affil, E-mail: [email protected]}
\title{\huge Article title}
\runningtitle{Article title}
\maketitle
\section{Introduction}
\subsection{2D v.s. 3D VSL}
\begin{table*}[h!t]
\caption{The main differences between the 2D and 3D VSL approach.}
\label{table:differences}
%\centering
\begin{tabular}{|l|c|c|}
\hline
& \textbf{2D VSL} & \textbf{3D VSL} \\ \hline
Source of information & 2D Image & 3D Point Cloud \\ \hline
Applicable for & 3DOF Reconfiguration (X, Y, $\theta$) & 6DOF Reconfiguration (X, Y, Z, $\theta$, $\phi$, $\gamma$) \\ \hline
Transformation matrix & 2D to 2D (3x3) & 3D to 3D (4x4) \\ \hline
{\shortstack{ Estimating the observations \\ in demonstration phase }} &
{\shortstack{ Background Subtraction \\ Thresholding}} &
{\shortstack{ Voxelizing \\ Kd-tree \\ K Nearest-Neighbor search }} \\ \hline
{\shortstack{Match finding in\\ reproduction phase}} & {\shortstack{2D Features\\ 2D Feature Estimation\\ 2D Metrics (SIFT)\\ RANSAC for finding the rotation}} & {\shortstack{3D Features\\ 3D Feature Estimation\\ Voxelizing\\ Normal/Curvature Estimation\\ 3D Metrics (ICP/RANSAC/SAC-IA)}} \\ \hline
Main assumptions & {\shortstack{No overlap among objects\\ Objects have the same height \\ Objects are placed at the same level}} & {\shortstack{Applicable for partially visible objects\\ Objects can have different heights\\ Objects can be placed in different levels}} \\ \hline
\end{tabular}
\end{table*}
\end{document}
\end{document}
我得到以下结果:
问题在于:
1- 表格没有填满整个文本宽度 2- 边框线在某些地方没有连接 3- 有多余的线条
PS 使用之前\shortstack
我一直在用\tabular
但是出现了\noalign
错误,我怀疑是模板的样式问题。使用IEEE样式的表格是没有问题的。
答案1
该dgruyter_author
包重新定义tabular
,以便它基本上使用booktabs
无需用户干预的命令。因此,不应使用垂直规则。
对于拆分单元格,可以使用堆栈:
\documentclass[USenglish,twocolumn]{article}
\usepackage[utf8]{inputenc}%(only for the pdftex engine)
\usepackage[big]{dgruyter_author}
\usepackage[usestackEOL]{stackengine}
\newcommand{\splitcell}[1]{\Centerstack{#1}}
\begin{document}
\articletype{Research Article{\hfill}Open Access}
\author*[1]{Corresponding Author}
\affil[1]{Affil, E-mail: [email protected]}
\title{\huge Article title}
\runningtitle{Article title}
\maketitle
\section{Introduction}
\subsection{2D v.s. 3D VSL}
\begin{table*}[h!t]
\caption{The main differences between the 2D and 3D VSL approach.}
\label{table:differences}
\centering
\begin{tabular}{lcc}
\hline
& \textbf{2D VSL} \\ \hline
Source of information & 2D Image & 3D Point Cloud \\ \hline
Applicable for & 3DOF Reconfiguration (X, Y, $\theta$) &
6DOF Reconfiguration (X, Y, Z, $\theta$, $\phi$, $\gamma$) \\ \hline
Transformation matrix & 2D to 2D (3x3) & 3D to 3D (4x4) \\ \hline
\splitcell{Estimating the observations \\ in demonstration phase} &
\splitcell{Background Subtraction \\ Thresholding} &
\splitcell{Voxelizing \\ Kd-tree \\ K Nearest-Neighbor search} \\ \hline
\splitcell{Match finding in\\ reproduction phase} &
\splitcell{2D Features\\ 2D Feature Estimation\\ 2D Metrics (SIFT)\\
RANSAC for finding the rotation} &
\splitcell{3D Features\\ 3D Feature Estimation\\ Voxelizing\\
Normal/Curvature Estimation\\ 3D Metrics (ICP/RANSAC/SAC-IA)} \\ \hline
Main assumptions &
\splitcell{No overlap among objects\\ Objects have the same height \\
Objects are placed at the same level} &
\splitcell{Applicable for partially visible objects\\
Objects can have different heights\\
Objects can be placed in different levels} \\ \hline
\end{tabular}
\end{table*}
\end{document}
如果你不想使用其他包,下面的定义\splitcell
也可以
\newcommand{\splitcell}[1]{%
\begin{baretabulars}%
\begin{tabular}{@{}c@{}}\strut#1\strut\end{tabular}%
\end{baretabulars}%
}
笔记
有一个错误dgruyter_author.sty
:第 953 行启动的条件未正确结束。因此,在当前第 954 行和第 955 行之间,有一行包含
\fi
应该插入。当前代码是
953 \ifx\dgf@nts\@undefined
954 \RequirePackage[lighttt]{lmodern}
955 \newbox\dg@wordmark
(为清楚起见添加了行号);应该是
\ifx\dgf@nts\@undefined
\RequirePackage[lighttt]{lmodern}
\fi
\newbox\dg@wordmark