7

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}
2
  • Welcome to TeX - LaTeX! What have you tried? Please post a minimal working example (MWE) demonstrating your set-up. Mar 2, 2016 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, 2016 at 13:10

2 Answers 2

7

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}
6

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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.