테이블의 한 줄 전체를 삼진으로 처리하다

테이블의 한 줄 전체를 삼진으로 처리하다

테이블의 전체 줄을 삭제하고 싶습니다.

좋지 않은 해결책은 soul패키지를 사용하고 각 셀의 텍스트를 취소하는 것입니다.

\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}%
  \label{tab:addlabel}%
    \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}

거기에 더 좋은 것이 있습니까?

답변1

다음은 soul간단 \hline하고 \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}%
  \label{tab:addlabel}%
    \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} 

여기에 이미지 설명을 입력하세요

답변2

{NiceTabular}의 환경에서는 nicematrixTikZ와 에 의해 배열에 생성된 노드를 사용하여 원하는 규칙을 쉽게 그릴 수 있습니다 nicematrix.

\documentclass[border=5pt]{article}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{nicematrix,tikz}

\begin{document}

\begin{sidewaystable}[htbp]
\centering
\newcolumntype{'}{!{\vrule}}
\begin{NiceTabular}{ 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}{} & $\langle\rho\rangle$ & \#vals. & $\langle\rho\rangle$ & \#vals. & $\langle\rho\rangle$ & \#vals. & $\langle\rho\rangle$ & \#vals. & $\langle\rho\rangle$ & \#vals. \\
    \hline
    Bridging Centrality & 0.38 & 2 & 0.52 & 3 & 0.48 & 6 & 0.52 & 12 & 0.45 & 5 \\
    \hline
    Bridging Centrality & 0.38 & 2 & 0.52 & 3 & 0.48 & 6 & 0.52 & 12 & 0.45 & 5 \\
    \hline
\CodeAfter
   \tikz \draw [red,double] (3.5-|1) -- (3.5-|last) ; 
\end{NiceTabular}%
\label{tab:addlabel}%
\caption{$\langle\rho\rangle$ 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} 

위 코드의 출력

관련 정보