1

I would like to create a table that looks like the following:enter image description here

I do not know how to create different borders for each cell. This is what I have so far:

\documentclass[a4paper, 12pt]{article}

\begin{document}
    \begin{tabular}{|c|c||c|c|}
        \hline \hline
        & \textbf{Investigation 1} & \textbf{Investigation 2} & \\
        \hline \hline
        & \textbf{Angle at midpoint} & \textbf{Left distance} & \textbf{Right distance}\\
        \hline
        Configuration 1& & &\\
        \hline
        Configuration 2& & &\\
        \hline
        Configuration 3& & &\\   
        \hline    
    \end{tabular}
\end{document}
1
  • Your image can't be displayed, because it has errors, says a message…
    – Bernard
    Jun 21, 2017 at 12:08

1 Answer 1

2

You can get the double lines indicated in the figure by using hhline.sty. I have assumed that the two right columns both belong to Investigation 2.

\usepackage{hhline}
[...]
\begin{tabular}{|c|c||c|c|}
  \hhline{~|t:=:t:==:t|}
  \multicolumn{1}{c||}{} & \textbf{Investigation 1} & \multicolumn{2}{c||}{\textbf{Investigation 2}} \\
  \hhline{~|b:=::=:=:b|}
  \multicolumn{1}{c|}{} & \textbf{Angle at midpoint} & \textbf{Left distance} & \textbf{Right distance}\\
  \hhline{--||--}
  Configuration 1& & &\\\hhline{--||--}
  Configuration 2& & &\\\hhline{--||--}
  Configuration 3& & &\\\hhline{--||--}
\end{tabular}

enter image description here

It should also be mentioned that the table will get a more professional look with booktabs.sty.

\usepackage{booktabs}
[...]
\begin{tabular}{ccccc}
  \toprule
  & \textbf{Investigation 1} && \multicolumn{2}{c}{\textbf{Investigation 2}} \\\cmidrule{2-2}\cmidrule{4-5}
  & \textbf{Angle at midpoint} && \textbf{Left distance} & \textbf{Right distance}\\\midrule
  Configuration 1 & && &\\
  Configuration 2 & && &\\
  Configuration 3 & && &\\\bottomrule    
\end{tabular}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .