# strike out an entire line in table

I want to strike out an entire line in a table.

A not nice looking solution is to use soul package and strike out the text in each cell.

\documentclass[border=5pt]{article}
\usepackage{multirow}
\usepackage{tabls}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{soul}

\begin{document}

\begin{sidewaystable}[htbp]
\centering
\begin{tabular}{ lcc|cc|cc|cc|cc }
\cmidrule{2-11}          & \multicolumn{2}{c}{\textbf{1 week}} & \multicolumn{2}{c}{\textbf{2 weeks}} & \multicolumn{2}{c}{\textbf{3 weeks}} & \multicolumn{2}{c}{\textbf{4 weeks}} & \multicolumn{2}{c}{\textbf{5 weeks}} \\
\cmidrule{2-11}
\cmidrule{2-11}    \multicolumn{1}{l}{} & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. \\
\hline
\st{Bridging Centrality} & \st{0.38}  & \st{2}     & \st{0.52}  & \st{3}     & \st{0.48}  & \st{6}     & \st{0.52}  & \st{12}    & \st{0.45}  & \st{5} \\
\hline
Bridging Centrality & 0.38  & 2    & 0.52  & 3     & 0.48  & 6     & 0.52  & 12    & 0.45  & 5 \\
\hline
\end{tabular}%
\caption{$<\rho>$ is the mean of the correlation coefficients that have a significant ($<0.05$) p-value. \#vals indicates the number (out of 20) of correlation coefficient that are significant.}
\end{sidewaystable}%

\end{document}


Is there something better out there?

Here is a simple way to do it, without soul: a simple \hline and a\vspace.

\documentclass[border=5pt]{article}
\usepackage{multirow}
\usepackage{tabls}
\usepackage{booktabs}
\usepackage{rotating}

\begin{document}

\begin{sidewaystable}[htbp]
\centering
\begin{tabular}{ lcc|cc|cc|cc|cc }
\cmidrule{2-11} & \multicolumn{2}{c}{\textbf{1 week}} & \multicolumn{2}{c}{\textbf{2 weeks}} & \multicolumn{2}{c}{\textbf{3 weeks}} & \multicolumn{2}{c}{\textbf{4 weeks}} & \multicolumn{2}{c}{\textbf{5 weeks}} \\
\cmidrule{2-11}
\cmidrule{2-11} \multicolumn{1}{l}{} & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. & $<\rho>$ & \#vals. \\
\hline
Bridging Centrality & 0.38 & 2 & 0.52 & 3 & 0.48 & 6 & 0.52 & 12 & 0.45 & 5 \\[-2.2ex]
\hline\noalign{\vspace{\dimexpr 2.2ex-\doublerulesep}}
\hline
Bridging Centrality & 0.38 & 2 & 0.52 & 3 & 0.48 & 6 & 0.52 & 12 & 0.45 & 5 \\
\hline
\end{tabular}%
\caption{$<\rho>$ is the mean of the correlation coefficients that have a significant ($<0.05$) p-value. \#vals indicates the number (out of 20) of correlation coefficient that are significant.}

• Wish latexdiff would use this! – cfr Aug 2 '17 at 3:07
• What does \noalign do exactly? – cfr Aug 2 '17 at 17:28
• @cfr: Without it, using \vspace{\dimexpr ...} leads to an error message misplaced \noalign. – Bernard Aug 2 '17 at 18:17
• @cfr \noalign inserts vertical mode material between the rows of a table, it underlies \halign and booktabs spacing and \rowcolor and other stuff. – David Carlisle Aug 2 '17 at 19:22
• @cfr \halign starts with \noalign and it has to be the first thing in the row, \\ (anything) \hline will give that error, but \\ \noalign{anything) \hline doesn't start the row before \hline – David Carlisle Aug 3 '17 at 0:32