I'm trying to make a time plan for a project using tables in LaTeX but I've run into a small problem. The table below will look fine until I try to colour individual cells by adding \usepackage[table,usenames,dvipsnames]{xcolor}
. Doing this will stretch the middle column all the way out to the right edge of the paper. It does this even without me adding the \cellcolor{somecolor}
command or making any other alterations to the table.
Here's a little bit more elaborate example than was originally posted:
\documentclass[a4paper,12pt]{article}
\usepackage{ucs}
\usepackage[hmargin=2cm,vmargin=2cm,a4paper]{geometry}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[hang,small,bf]{caption}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{pdfsync}
\usepackage{url}
\usepackage{verbatim}
\usepackage{parskip}
\usepackage{listings}
\usepackage{float}
\usepackage[utf8x]{inputenc}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[table,usenames,dvipsnames]{xcolor}
\pagestyle{fancy}
\fancyhf{}
% Document start
\begin{document}
\begin{titlepage}
\begin{center}
\end{center}
\end{titlepage}
\section*{Time plan}
\noindent X\dotfill X
\noindent\begin{tabular*}{\textwidth}{r p{8cm} @{\extracolsep{\fill}} l}
\toprule
Week & Task & Date \\
\midrule
37 &\cellcolor{yellow} Project start & 2012-09-13 \\
\bottomrule
\end{tabular*}
\pagebreak
\end{document}
And here's what it looks like:
I have seriously no idea of what's going on here so any help would be much appreciated! It might be worth pointing out that I'm also using the multirow
package, if that has any impact on making coloring work. All packages seems to be up to date.
\documentclass
and the appropriate packages so that those trying to help don't have to recreate it.