3

I have using a thesis template, but I want to insert a table like what I did in word. But you know, it is not possible to do that at all. So I just want to insert a like-most table. The image shot is my table in word, and what I am doing in LaTeX is:

\newcommand\fontcolor{}

\begin{center}
\setlength{\arrayrulewidth}{2pt}
\arrayrulecolor{white}             % Color of all vertical lines.

\begin{tabular}[H]{|l|l|c|}        % left | center | right for each line.

\arrayrulecolor{white}\hline       % Color of the first(top) horizontal line.
\rowcolor[rgb]{0.30980, 0.50588, 0.73725}
\noalign{\gdef\fontcolor{\color{white}}}
                                     % Font color in 1st row.                                   
Feature & Format & NO.\\
\arrayrulecolor{white}\hline         % Color of the second horizontal line.
\rowcolor[rgb]{0.82353, 0.87843, 0.92941}
\noalign{\gdef\fontcolor{\color{}}}                         % Fon color in other Row
France & Paris & Seine \\

\arrayrulecolor{white}\hline%\cline{1-1}  % Color of the 3rd line for the 1st grid.
Russia & Moscow & Moskva \\ 
\arrayrulecolor{white}%\cline{2-3}    % Color of the 4th line and last grid of the 3rd line.

\end{tabular}
\end{center}

I searched and have had a look at several posts. But no one works. Could anyone help?

In word

1 Answers1

7

Please always post complete documents showing all packages used. I guess colortbl here.

Note there is no H option for tabular.

enter image description here

\documentclass{article}
\usepackage{colortbl,hhline}
\definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725}
\definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}
\begin{document}


\begin{center}
\setlength{\arrayrulewidth}{2pt}
\setlength{\extrarowheight}{1pt}
\color{c1}
\arrayrulecolor{white}  

\begin{tabular}{|l|l|c|}
\hline
\rowcolor{c1}
\color{c2}Feature &
\color{c2}Format &
\color{c2}NO.\  \\
\hline   %added \\ here
\rowcolor{c2}
France & Paris & Seine \ \\
\hline  %added \\ here
\rowcolor{c2}
Russia & Moscow & Moskva \\ 
\hline
\end{tabular}
\end{center}

\end{document}
David Carlisle
  • 757,742