4

I am using a template from this journal. When I am placing table in covering 2 columns (textwidth) using table* I get the following error.

MWE:

\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@email.edu}
\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}

I get the following result:

enter image description here

The problems are:

1- the table doesn't fill the whole textwidth 2- the borderlines are not connected at some places 3- there are extra lines

P.S. before using \shortstack I was using \tabular but there was a \noalign error, which I suspected is because of the style of the template. The table using the IEEE style is OK with no problem.

  • Did you try the makecell package, that allows for common formatting of cells and linebreaks inside cells with the thead, makecell, \multirowthead and \multirowcell commands? – Bernard Sep 17 '14 at 14:24
3

The dgruyter_author package redefines tabular so that it basically uses booktabs commands without user's intervention. As such, vertical rules shouldn't be used.

For the split cells you can use a stack:

\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@email.edu}
\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}

If you don't want to use another package, the following definition of \splitcell will work too

\newcommand{\splitcell}[1]{%
  \begin{baretabulars}%
  \begin{tabular}{@{}c@{}}\strut#1\strut\end{tabular}%
  \end{baretabulars}%
}

enter image description here


Note

There is a bug in dgruyter_author.sty: the conditional initiated on line 953 is not properly ended. So between the current lines 954 and 955 a line containing

\fi

should be inserted. The current code is

953 \ifx\dgf@nts\@undefined
954   \RequirePackage[lighttt]{lmodern}
955 \newbox\dg@wordmark

(line numbers added for clarity); it should be

\ifx\dgf@nts\@undefined
  \RequirePackage[lighttt]{lmodern}
\fi
\newbox\dg@wordmark

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.