Graphics, Figures & TablesCant get my table right

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
wanzie
Posts: 1
Joined: Sun Apr 03, 2011 6:15 pm

Cant get my table right

Post by wanzie »

I'm trying to get my table the way i want it to be, but I can't get it right.

In attachment you see what i want. the code I have is also added.

Thank you.

Code: Select all

\begin{table}[h]
\centering
\begin{tabular}{| p{2cm} || p{3cm} | p{3cm} | p{3cm} |}
\hline
\rowcolor{gray!25} &\textbf{GUMO} & \textbf{Emotions Ontology} & \textbf{WordNet Affect} \\ \hline \hline
\textbf{Complex} & laag & hoog & laag \\ \hline
\textbf{Complexiteit} & laag & hoog & laag \\ \hline
\end{tabular}
\caption{Vergelijking tussen GUMO, Emotions Ontology en WordNet Affect}
  	\label{tab:vergelijkingontol}
\end{table}
Attachments
tabel.pdf
(2.4 KiB) Downloaded 145 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

Frits
Posts: 169
Joined: Wed Feb 02, 2011 6:02 pm

Cant get my table right

Post by Frits »

You might want to use \cellcolor instead of \rowcolor, as in:

Code: Select all

\begin{table}[h]
\centering
\begin{tabular}{| p{2cm} || p{3cm} | p{3cm} | p{3cm} |}
\hline
 & \cellcolor{gray!25}\textbf{GUMO} & \cellcolor{gray!25}\textbf{Emotions Ontology} & \cellcolor{gray!25}\textbf{WordNet Affect} \\ \hline \hline
\cellcolor{gray!25}\textbf{Complex} & laag & hoog & laag \\ \hline
\cellcolor{gray!25}\textbf{Complexiteit} & laag & hoog & laag \\ \hline
\end{tabular}
\caption{Vergelijking tussen GUMO, Emotions Ontology en WordNet Affect}
     \label{tab:vergelijkingontol}
\end{table}
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Post Reply