0

I have the following setting:

\documentclass[graybox]{svmult}

\usepackage{type1cm}        % activate if the above 3 fonts are
\usepackage{makeidx}         % allows index generation
\usepackage{graphicx}        % standard LaTeX graphics tool
\usepackage{multicol}          % used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
\usepackage{newtxtext}
\usepackage{newtxmath}       % selects Times Roman as basic font
\usepackage{color, colortbl}
\definecolor{Gray}{gray}{0.9}

\makeindex

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\title*{My article}
\author{Me}
\maketitle
\abstract{My abstract}

%%% Table %%%
\begin{table}[!t]
\caption{Listing something.}
\label{tab:linmodres}
% Table body
\begin{tabular}{p{0,05\textwidth}p{0,27\textwidth}>{\centering\columncolor{Gray}}p{0,17\textwidth}>{\centering}p{0,17\textwidth}>{\centering}p{0,17\textwidth}p{0,17\textwidth}}
\hline\noalign{\smallskip}
Sy. & Predictor & Estimate & Std. error & $t$-value & $p$-value \\
\noalign{\smallskip}\svhline\noalign{\smallskip}
$X_0$ & Intercept & 1 & 1 & 1 & 1\\
$X_1$ & Activity & 1 & 1 & 1 & 1\\
\noalign{\smallskip}\hline\noalign{\smallskip}
\end{tabular}
\end{table}
%%% End Table %%%

\end{document}

I cannot get the last column to be center aligned. If I change the header of the tabular like this:

\begin{tabular}{p{0,05\textwidth}p{0,27\textwidth}>{\centering\columncolor{Gray}}p{0,17\textwidth}>{\centering}p{0,17\textwidth}>{\centering}p{0,17\textwidth}>{\centering}p{0,17\textwidth}}

I get this:

! Misplaced \noalign.
<recently read> \noalign 

l.46 \noalign
             {\smallskip}\svhline\noalign{\smallskip}

What am I doing wrong?

Andry
  • 1,287
  • 1
    \centering should be \centering\arraybackslash. See also https://tex.stackexchange.com/a/12712/134144 – leandriis Dec 24 '19 at 08:32
  • If I run your MWE, I get an error message about \svhline being undefined. – leandriis Dec 24 '19 at 08:44
  • Why not use simple c type columns (or even better: S type columns from siunitx for the columns containing numbers)? What's the point in adding that much white space by stretching the table? – leandriis Dec 24 '19 at 08:52
  • I apologize as the MWE does not work, it is because svmult is necessary as I am using Springer template for co-authored books – Andry Dec 24 '19 at 11:04

0 Answers0