
I fail at combinding
multicolumn
and cmidrule
.multicolumn
and cmidrule
.NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Code: Select all
\documentclass[a4paper]{article}
\usepackage{booktabs}
\usepackage{rotating}
\begin{document}
\begin{table}
\caption{Overview}
% \par\bigskip
\label{overview}
\rotatebox{90}{%
\centering
\begin{tabular}{@{}p{4cm}p{4.5cm}p{4cm}p{4.2cm}p{1.8cm}@{}}
% \firsthline<-- what's that?
\toprule
Name A & Name A & Name A & Name A & Name A \\
\cmidrule(r){1-1}
\cmidrule(lr{3.4cm}){2-2}
\cmidrule(lr){3-3}
\cmidrule(lr){4-4}
\cmidrule(l){5-5}
A & B & C & D & E \\
A & B & C & D & E \\
% \lasthline<-- what's that?
\bottomrule
\end{tabular}%
}
\end{table}
\begin{table}
\centering
\caption{My caption}
\label{my-label}
\begin{tabular}{lllllllllll}
\toprule
& & \multicolumn{9}{l}{Model Animal} \\
\cmidrule{3-11}
& & \multicolumn{3}{l}{Duck} & \multicolumn{3}{l}{Wombat} & \multicolumn{3}{l}{Capybara} \\
\cmidrule(lr){3-5}\cmidrule(lr){6-8}\cmidrule(lr){9-11}
text & text & text & text & text & text & text & text & text & text & text \\
text & text & text & text & text & text & text & text & text & text & text \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p