Graphics, Figures & Tablesmore than one \cmidrule...\morecmidrules?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
piltdownpunk
Posts: 11
Joined: Tue Aug 09, 2011 8:05 pm

more than one \cmidrule...\morecmidrules?

Post by piltdownpunk »

Hello.

I'm trying include more than one \cmidrule in a table.

Code: Select all

\begin{table}[h!]
\begin{center}
\caption{Results of ANOVA for raw difference in attrition scores of adjacent teeth.}
\begin{tabular}{lcccccccc}
\toprule
& \multicolumn{3}{c}{Baseline} & \multicolumn{3}{c}{Non-baseline}\\
%\cmidrule(r){2-4} \morecmidrules \cmidrule(l){5-7}
Teeth & n & Mean & sd & n & Mean & sd & $F$ & Pr($>F$)\\
\midrule
NM1-NM2 & 49 & 6.92 & 2.64 & 76 & 7.36 & 3.86 & 1 & 1\\
NM2-NM3 & 34 & 5.03 & 1.88 & 70 & 5.41 & 4.03 & 1 & 1\\
XM1-XM2 & 50 & 7.82 & 2.56 & 75 & 7.71 & 5.22 & 1 & 1\\
XM2-XM3 & 36 & 4.83 & 2.84 & 71 & 5.72 & 3.36 & 1 & 1\\
\bottomrule
\end{tabular}
\end{center}
\end{table}


A line should be beneath "Baseline," and a separate line beneath "Non-baseline." I've hit a wall here. I've tried \morecmidrules, but can't get that to work. Any suggestions. Thanks so much.

--Trey
Last edited by piltdownpunk on Sun Oct 30, 2011 6:22 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

more than one \cmidrule...\morecmidrules?

Post by localghost »

I'm not sure if I understand you right. The \morecmidrules command that you mentioned is for producing double rules beneath certain ranges of cells. From your question I seem to spot that you want an interrupted rule with its two parts beneath the terms you mentioned. For the latter one your approach without the \morecmidrules command and the trimming parameters would be right. Perhaps you can clarify that.

And next time please prepare a proper minimal example. The special rule commands are not from vanilla LaTeX and nobody who doesn't know that they are provided by the booktabs package is willing to guess where they come from.


Thorsten
Post Reply