[Tex/LaTex] Create a LaTeX table with multiple columns within one cell

multirowtables

I am trying to replicate the table seen at this webpage:

enter image description here

I am trying to make the multiple cells appear in the cells of the second table column. How can this be done? I have tried using the multirow package.

MWE:

\documentclass{article}
\usepackage{longtable}
\usepackage{multirow}
\usepackage[table]{xcolor}
\begin{document}

\begin{longtable}{|p{3cm}|p{6cm}|p{5cm}|}
\hline
\rowcolor[HTML]{000000}
\multicolumn{1}{|c|}{\cellcolor[HTML]{000000}{\color[HTML]{FFFFFF} \textbf{Object}}}
    &\multicolumn{1}{|c|}{\cellcolor[HTML]{000000}{\color[HTML]{FFFFFF} \textbf{Details}}}
    & \multicolumn{1}{|c|}{\cellcolor[HTML]{000000}{\color[HTML]{FFFFFF} \textbf{Notes}}} \\ \hline
 NAME & \multicolumn{2}{c|}{test} {DATE} \\ {Time (UTC): 22:59:41-23:22:48} \\
                {Filter/s used: I, R, B, V} \\ {Telescope/s used: TELESCOPE}
    & A total of 20 exposures all taken with an exposure length of 60.0 seconds. \\ \hline
\end{longtable}

\end{document}

Best Answer

As long as your goal is just to reproduce the table, your problem has nothing to do with multirow. Your table has 4 columns and you just have to put partial horizontal lines with \cline{c1-c2}.

However, if you want to fill the cells in your file rather than by hand, you might have to use multirow.

\documentclass{article}

\usepackage[width=20cm]{geometry}

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

\newcommand\doublestrut{\vrule width 0pt height 2\ht\strutbox depth 2\dp\strutbox}

\begin{document}
\footnotesize
\begin{tabular}{|p{3cm}|p{2.4cm}|p{2.4cm}|p{10cm}|}\hline
\rowcolor{black}
\multicolumn{1}{|c|}{\doublestrut\color{white}\textbf{Index}}  &
    \multicolumn{2}{c|}{\color{white}\textbf{Details}}         &
    \multicolumn{1}{c|}{\color{white}\textbf{Notes}}\\\hline
\hfil Object & Date       & Time                    & \\
             &            &                         & \\\cline{2-3}
             & Eye Pierce & Seeing                  & \\
             &            &                         & \\\cline{2-3}
             & \multicolumn{2}{l|}{Instrument Type} & \\
             & \multicolumn{2}{l|}{}                & \\\hline
\hfil Object & Date       & Time                    & \\
             &            &                         & \\\cline{2-3}
             & Eye Pierce & Seeing                  & \\
             &            &                         & \\\cline{2-3}
             & \multicolumn{2}{l|}{Instrument Type} & \\
             & \multicolumn{2}{l|}{}                & \\\hline
\end{tabular}
\end{document}

enter image description here