# Formatting of Tabular environment

I have the following latex code for a table, but would like to alter the output to match the image below it. Could anyone tell me how I could do this?

\begin{tabular}{|l||c|c|c|}
\hline
& Week 1 & week 2 & Week 3 \\\hline\hline
$\ell$ & 1 & 1 & 1 \\\hline
$h$ & 2 & 2 & 2 \\\hline
\end{tabular}


-

Assuming that short lines from a first-line rectangle are undesired, we can do the following:

\documentclass{article}

\begin{document}

\begin{tabular}{|l||c|c|c|}
%\hline
\cline{2-4}
%& Week 1 & week 2 & Week 3 \\\hline\hline
\multicolumn{1}{c|}{}& Week 1 & week 2 & Week 3 \\
\cline{2-4}\noalign{\vskip2pt}\cline{1-4}
$\ell$ & 1 & 1 & 1 \\\hline
$h$ & 2 & 2 & 2 \\\hline
\end{tabular}

\end{document}


-
Or \vskip\doublerulesep instead of a hardcoded 2pt. Also \hline works in place of \cline{1-4} –  Dan Nov 18 '13 at 21:04

\documentclass{article}

\usepackage{array,hhline}
\setlength\extrarowheight{2pt}
\begin{document}
\begin{tabular}{|l||c|c|c|}
\hhline{~---}
\multicolumn{1}{c|}{}& Week 1 & week 2 & Week 3 \\
\hhline{-===}
$\ell$ & 1 & 1 & 1 \\\hline
$h$ & 2 & 2 & 2 \\\hline
\end{tabular}

\end{document}

-

Here's another option, using booktabs

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}

\usepackage{booktabs}

\begin{document}

\begin{tabular}{lccc}
\toprule
& Week 1 & Week 2 & Week 3 \\
\midrule
$\ell$ & 1      & 1      & 1      \\
$h$    & 2      & 2      & 2      \\
\bottomrule
\end{tabular}

\end{document}

-

I would look into the commands \cmidrule{a-b}to take care of the special case where the lines don't go into the first of the cells. http://en.wikibooks.org/wiki/LaTeX/Tables is a great place to start for advance tables.

-
\cmidrule comes from booktabs, and wouldn't work to get exactly that output. Try \cline{2-4} instead. –  Torbjørn T. Nov 17 '13 at 22:01