I have generated the table below in tablesgenerator.com so I'm sure the code is right. When I run it in Latex, I get an error "undefined control sequence" and cline-s are marked red. I added \usepackage{booktabs}\let\cline\cmidrule which somehow solved the problem but now there are gaps between the lines. Anyone knows how I can solve the issue?
Code: Select all
Code, edit and compile here:
\begin{table}[]\begin{tabular}{|c|c|ccccc|cc|}\hline\multirow{3}{*}{Polymorph} & \multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}Initial\\ Crystal\end{tabular}} & \multicolumn{5}{c|}{Method 1} & \multicolumn{2}{c|}{Method 2} \\ \cline{3-9}& & \multicolumn{1}{c|}{\multirow{2}{*}{Amorphization}} & \multicolumn{4}{c|}{\begin{tabular}[c]{@{}c@{}}Cold Compression\\ at Peak Pressures {[}GPa{]}\end{tabular}} & \multicolumn{1}{c|}{\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Isochoric\\ Amorphization\end{tabular}}} & \multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Volume\\ Relaxation\end{tabular}} \\ \cline{4-7}& & \multicolumn{1}{c|}{} & \multicolumn{1}{c|}{50} & \multicolumn{1}{c|}{100} & \multicolumn{1}{c|}{150} & 200 & \multicolumn{1}{c|}{} & \\ \hline$\alpha$-quartz & 2.79 & \multicolumn{1}{c|}{2.58} & \multicolumn{1}{c|}{2.59} & \multicolumn{1}{c|}{2.67} & \multicolumn{1}{c|}{2.76} & 2.79 & \multicolumn{1}{c|}{2.79} & 2.75 \\ \hlineStishovite & 4.29 & \multicolumn{5}{c|}{-} & \multicolumn{1}{c|}{4.29} & 2.86 \\ \hline\end{tabular}\label{tab:density}\end{table}