Suppose I have a table like this:
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{cc|cc|c|}
\cline{3-5}
& & \multicolumn{2}{c|}{\multirow{2}{*}{a}} & c \ \cline{1-2} \cline{5-5}
\multicolumn{1}{|c|}{d} & e & \multicolumn{2}{c|}{} & h \ \hline
\multicolumn{2}{c|}{} & \multicolumn{1}{c|}{i} & j & k \ \hline
\multicolumn{1}{|c|}{l} & m & \multicolumn{1}{c|}{n} & o & p \ \hline
\end{tabular}
\end{document}
Is there any way to modify each cell of a table in LaTeX, and change the corners of each box independently? How can I achieve such a table?
The "a" cell is a multirow cell, and I want to change the corners of the other cells similar to the image below:
In this answer [here], it only gives the entire table's corner, and you cannot make a table like this one:
What about coloring those cells?
This is the code for the latest table with LaTeX's default sharp corners:
\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{ll|ll|ll|}
\cline{3-6}
& & \multicolumn{2}{l|}{\multirow{2}{*}{a}} & \multicolumn{2}{l|}{b} \ \cline{5-6}
& & \multicolumn{2}{l|}{} & \multicolumn{2}{l|}{c} \ \hline
\multicolumn{1}{|l|}{x} & 1 & y & 1 & z & 1 \ \hline
\multicolumn{1}{|l|}{} & & & & & \ \hline
\end{tabular}
\end{document}




nicematrixpackage. But please consider making your MWE compilable (that is, add a\documentclassetc). – Jasper Habicht Sep 06 '23 at 09:54