# Fix table on svjour3 class

I have the following table that I want to reproduce (minus the header colour):

But instead, this is the result I have so far:

Can anyone help me fix:

1) The mismatch alignment of the table (coloured numbers are on the bottom part of the cell while the rest don't) 2) The mismatch between the vertical lines (the header vertical lines are thinner than the rest of the table, that's why some of them "disappear" on the pdf previewer at normal zoom, and become noticeable just at +200% zoom)

My MWE is the following:

\documentclass[smallcondensed]{svjour3}
\smartqed
\usepackage{mathptmx}
\usepackage{tabularx}
\usepackage{caption}

\usepackage[table, svgnames, dvipsnames]{xcolor}
\usepackage{makecell}

\begin{document}

\begin{table*}
\begin{tabularx}{\textwidth}{p{7cm}|X|X|X|X|X}
Landmark&CR&NR&DT&TE&Score \\ \hline
Church of Our Lady of the Assumption and St Gregory&\color{red}{6}&1&2&1&\color{red}{3}\\ \hline
Supreme Court of the United Kingdom&\color{red}{3}&6&8&5&\color{red}{6} \\ \hline
\end{tabularx}

\end{table*}

\end{document}

• instead of \color{red}{3} use \textcolor{red}{3} (at all similar cases). Sep 9, 2018 at 19:19

I suggest you use X for the first column and c for the next 5 columns. And, use \textcolor{...}{...} instead of \color{...}{...}.

 \documentclass[smallcondensed]{svjour3}
\smartqed
\usepackage{newtxtext,newtxmath} % {mathptmx} % 'mathptmx' is ancient
\usepackage{tabularx,caption,makecell}
\usepackage[table, svgnames, dvipsnames]{xcolor}

\begin{document}

\begin{table}
\setlength\extrarowheight{2pt} % for a more open "look"
\begin{tabularx}{\textwidth}{@{} X |c|c|c|c|c @{}}
Landmark&CR&NR&DT&TE&Score \\
\hline
Church of Our Lady of the Assumption and St Gregory
&\textcolor{red}{6}&1&2&1&\textcolor{red}{3}\\
\hline
&\textcolor{red}{6}&1&2&1&\textcolor{red}{3} \\
\hline
Supreme Court of the United Kingdom
&\textcolor{red}{3}&6&8&5&\textcolor{red}{6} \\
\hline
\end{tabularx}
\end{table}
\end{document}


Actually, if this were my document, I'd simplify the table's look by getting rid of all vertical lines and using fewer, but well-spaced, horizontal lines. I'd also reduce the overall width of the table, by not using a tabularx environment.

 \documentclass[smallcondensed]{svjour3}
\smartqed
\usepackage{newtxtext,newtxmath} % {mathptmx}
\usepackage{tabularx,caption,booktabs}
\usepackage[table, svgnames, dvipsnames]{xcolor}

\begin{document}

\begin{table}
\centering
\begin{tabular}{@{} l ccccc @{}}
\toprule
Landmark&CR&NR&DT&TE&Score \\
\midrule
Church of Our Lady of the Assumption and St Gregory
&\textcolor{red}{6}&1&2&1&\textcolor{red}{3}\\
&\textcolor{red}{6}&1&2&1&\textcolor{red}{3} \\
Supreme Court of the United Kingdom
&\textcolor{red}{3}&6&8&5&\textcolor{red}{6} \\
\bottomrule
\end{tabular}
\end{table}
\end{document}

• Thank you!! and what would be the solution if I use \cellcolor and \rowcolor @Mico ? Sep 9, 2018 at 19:49
• @user151562 - For sure, if you use \cellcolor and \rowcolor, don't use vertical lines, and do get rid of most horizontal lines. E.g., if you use \rowcolor for the header row, you don't need \toprule and \midrule.
– Mico
Sep 9, 2018 at 20:04