
Gostaria de renderizar a seguinte tabela:
----------------------------------
| Col1 | Col2 |
-------------------------------------------------
|label 1 | | blah2 |
| | | blah2 |
---------------- blah1 -------------
|label 2 | blah1 | blah3 |
| | | blah3 |
-------------------------------------------------
Como posso fazer isso?
Até agora, fiz isso replicando o conteúdo:
\begin{tabular}{|l|l|l|}
\hline
& Col1 & Col2 \\
\hline
\textbf{label 1} & blah1 & blah2\\
& blah1 & blah2\\
\hline
\textbf{label 2} & blah1 & blah3\\
& blah1 & blah3\\
\hline
\end{tabular}
o que não é o que eu gostaria de fazer, pois replica dados. Não sei como unificar linha1 e linha2 de col1.
Responder1
\documentclass{article}
\usepackage{multirow}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
\begin{document}
\begin{tabular}{|>{\bfseries}l|C{1cm}|C{1cm}|}
\cline{2-3}
\multicolumn{1}{l|}{}& Col1 & Col2 \\
\hline
label 1 & \multirow{2}{1cm}[-4mm]{blah1 blah1} & blah2 blah2\\
\cline{1-1}\cline{3-3}
label 2 & & blah3 blah3\\
\hline
\end{tabular}
\end{document}