1

I'm making a colored table for a time planning exercise. I made a specialrule since \midrule were too close to the activities. Spacing is now functional but the cells are not getting colored wholly. How can I color the entire cell?

\documentclass[12pt]{article}

\usepackage[table]{xcolor}
\usepackage{booktabs}

\newcommand{\thinrule}{\specialrule{0.045 ex}{0.07 ex}{0.19 ex}}
\colorlet{mark}{black!25}
\newcommand*{\z}{\cellcolor{mark}}
\newcommand*{\mc}[2]{\multicolumn{#1}{c}{#2}}
\newcommand*{\y}[1]{\multicolumn{1}{c}{#1}}


\begin{document}
\begin{tabular}{p{0.55\textwidth}*{4}{p{3em}}}
\toprule
& \mc{4}{Month} \\
\cmidrule{2-5}
\mc{1}{Activity}         &\y{1}  &\y{2}&\y{3}&\y{4}             \\
\midrule
Foo1                     & \z    &     &       &                  \\ \thinrule
Foo2                     & \z    &     &       &                  \\ \thinrule
Foo3                     & \z    &  \z &       &                  \\
\bottomrule
\end{tabular}
\end{document}

Table I'm trying to fix

Kurzd
  • 1,017
  • 2
    See for example http://tex.stackexchange.com/questions/11198/coloring-columns-in-a-table-with-colortbl-and-booktabs – Pieter van Oostrum Nov 09 '16 at 15:06
  • It's working as intended now. Should this question be deleted now? – Kurzd Nov 09 '16 at 15:13
  • 1
    @Kurzd - No need to delete your posting! It turns out to be duplicate of an earlier posting, though. On this site, we tend to mark such postings as duplicates -- rather than delete them. :-) – Mico Nov 09 '16 at 16:10

0 Answers0