TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want my table to have separated cells. Basically double lines but I can't figure how to have horizontal lines disconnected. I tried \hline and \cline but those connect too.

This is best I can do:

enter image description here

This is how I want my table to look: enter image description here

\begin{tabular}{|c||c||c||c|}
  \hline
  \multicolumn{2}{|c||}{First Cell}&
  Second Cell&
  Third Cell\\
  \hline
  \hline
  \begin{tabular}{@{}l@{}} Data\\ Data\\ Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}\\

  \hline

\end{tabular}
share|improve this question
    
Welcome to TeX - LaTeX! What have you tried? Please post a minimal working example (MWE) demonstrating your set-up. – Andrew Swann Mar 2 at 13:03
    
I also tried putting every cell in its nested tabular environement but that way it messes up spaceing between cells of primary table – ssekav Mar 2 at 13:10

You can achieve this with the hhline package:

Result

\documentclass{article}
\usepackage{hhline}
\begin{document}
\begin{tabular}{|c||c||c||c|}
  \hhline{|--||-||-|}
  \multicolumn{2}{|c||}{First Cell}&
  Second Cell&
  Third Cell\\
  \hhline{=:t:=::=::=:}
  \begin{tabular}{@{}l@{}} Data\\ Data\\ Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}\\
  \hhline{=::=::=::=:}
  More data &
  More data &
  More data &
  More data\\
  \hhline{|-||-||-||-|}

\end{tabular}
\end{document}
share|improve this answer

enter image description here

\documentclass{article}

\usepackage{array,hhline}

\begin{document}

\setlength\extrarowheight{2pt}
\begin{tabular}{|c||c||c||c|}
  \hhline{|--||-||-|}
  \multicolumn{2}{|c||}{First Cell}&
  Second Cell&
  Third Cell\\
  \hhline{=:t:=::=::=}
  \begin{tabular}{@{}l@{}} Data\\ Data\\ Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}&
  \begin{tabular}{@{}l@{}}
    Data\\
    Data\\
    Data\\
  \end{tabular}\\
  \hhline{|-||-||-||-|}
\end{tabular}

\end{document}
share|improve this answer

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.