0

I'm trying to create a tabular table that matches the following format, but I can't for the life of me figure it out. Cells marked "(w/b)" should be white text on a black background.

----------------------------------------
| Title (w/b)                          |
|--------------------------------------|
| Description                          |
|--------------------------------------|
| Item 1 (w/b) | Item 1 description.   |
|--------------------------------------|
| Item 2 (w/b) | Item 2 description.   |
|--------------------------------------|
| Item 3 (w/b) | Item 3 description.   |
----------------------------------------

Basically five rows and two columns, maybe five columns with one for item names and four for item descriptions. Borders between each row. I also need it to stretch the width of the page (within margins) to give plenty of room for descriptions. Any pointers?

1 Answer 1

2

enter image description here

\documentclass{article}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage[svgnames,table]{xcolor}
\usepackage{makecell, multirow, tabularx,booktabs,nicematrix}
    
\begin{document}
    \renewcommand{\thead}{\color{white}\large\bfseries\sffamily}

    \noindent\begin{NiceTabular*}{\columnwidth}{lc}[colortbl-like, code-before=\columncolor{gray} 
       {1}]
    \rowcolor{black}\thead{Title} & \thead{Description} \\ 
            Item &       {\parbox{10cm}  {\raggedright Island Museum analyzes historical artifacts using one or more techniques described below – all but one of which is performed by an outside laboratory – to obtain specific information about an object’s creation. For each type of material listed, the museum uses only the technique described:}}                            \\
    \end{NiceTabular*}

\end{document}

You must log in to answer this question.

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