Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to draw a table which has multi-column in one row, as it is shown by the uploaded image. I have the code of a regular table in this style and I tried to modify it but failed. The uploaded image is a snapshot of word version table. I also want to control the line width between rows and columns, for the line width in LaTex is a little wider. So, it is not that pretty. BTW, is it possible to control the font of text in table? Could you help a little? Appreciate that.

enter image description here

\definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725}
\definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}

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

\begin{tabular}{|l|c|c|l|}

\rowcolor{c2}
\multirow{3}{*}{Measure} & \multicolumn{2}{|c|}{Description} & \multirow{3}{*}{NO.} \\
\hline

\rowcolor{c2}
{DFDF} & {fdsafdas} & {asdfasdf} & {asdfasd} \\
\hline

\rowcolor{c2}
{DFDF} & {fdsafdas} & {asdfasdf}  \\
\hline

\end{tabular}
\end{center}
share|improve this question
    
I can't find a multirow on the image. Does this help? –  masu Dec 11 '13 at 23:01
    
Yes, really appreciate you help. –  user18441 Dec 12 '13 at 9:41

2 Answers 2

up vote 0 down vote accepted

as masu mentioned, in showed picture you haven't multirows. probably with multirow you think on more lines in one cells, as you can see from example below:

\documentclass[border=5mm]{standalone}
    \usepackage[table]{xcolor}
\begin{document}
\definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725}
\definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}
\setlength{\arrayrulewidth}{2pt}
\setlength{\extrarowheight}{1pt}
\arrayrulecolor{white}

    \begin{tabular}{|p{4em}|c|c|l|}
\rowcolor{c1}
\textcolor{white}{Measure} 
        & \multicolumn{2}{c|}{\textcolor{white}{Description}} 
                                        &   \textcolor{white}{NO.}  \\
    \hline
\rowcolor{c2}
DFDF    &   fdsafdas    &   asdfasdf    & {asdfasd}                 \\
    \hline
\rowcolor{c2}
DFDF DFDF   & fdsafdas  &   asdfasdf    &                           \\
    \hline
    \end{tabular}
\end{document}
share|improve this answer
    
Zarko, thank you very much for help. –  user18441 Dec 12 '13 at 9:05

May be like this:

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{array,multirow}

\begin{document}
\definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725}
\definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}

\begin{center}
\setlength{\arrayrulewidth}{2pt}
\setlength{\extrarowheight}{1pt}
%% \renewcommand{\arraystretch}{3} %% can use this also
\color{c1}
\arrayrulecolor{white}

\begin{tabular}{|>{\rule{0pt}{2\baselineskip}}p{1.5cm}|
    >{\centering\arraybackslash}p{3cm}|
    >{\centering\arraybackslash}p{5cm}|
    p{1.5cm}|}

\rowcolor{blue}
\multicolumn{1}{|l|}{\textcolor{white}{Measure}} & \multicolumn{2}{l|}{\textcolor{white}{Description}} & \textcolor{white}{NO.} \\
\hline

\rowcolor{c2}
DFDF & fdsafdas & asdfasdf & asdfasd \\[\baselineskip]
\hline

\rowcolor{c2}
DFDF & \multicolumn{2}{p{\dimexpr2\tabcolsep+\arrayrulewidth+8cm\relax}|}{fdsafdas  asdfasdf this line is going to be long and occypy the second line possibly} & asdfasdf \\[2\baselineskip]
\hline

\end{tabular}
\end{center}
\end{document}

enter image description here

share|improve this answer
    
Harish, thank you very much. –  user18441 Dec 12 '13 at 9:05
    
If I have a regular table like below. How can I set the line width? I tried to use 'p{4em}', but I must used it incorrectly. \definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725} \definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941} \begin{center} \setlength{\arrayrulewidth}{2pt} \setlength{\extrarowheight}{1pt} \color{c1} \arrayrulecolor{white} \begin{tabular}{|l|l|c|} % l or c means concentrate on the left side or center. \hline \rowcolor{c1} \color{c2}Feature & \color{c2}Format & \color{c2}NO.\\hline \rowcolor{c2} LP1 & 256-histogram vector & 1-C1 \\hline \end{tabular} \end{center} –  user18441 Dec 12 '13 at 9:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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