- 如何使用
hhline
包减少第二列中特定的水平规则长度?
- 第二列的黄线,左侧规则宽度需要减少。
\documentclass{book}
\usepackage{colortbl}
\usepackage{array}
\usepackage{hhline}
\usepackage{ragged2e}
\newcolumntype{L}[1]{>{\RaggedRight\arraybackslash\hspace{0pt}}p{#1}}%\hangindent6pt
\begin{document}
\begin{tabular}{|L{50pt}|L{50pt}|L{50pt}|L{50pt}|L{50pt}|L{50pt}|}
Sample 1 &Sample 2 &Sample 3 &Sample 4 &Sample 5&Sample 6\\
Sample 1 &Sample 2 &Sample 3 &Sample 4 &Sample 5&Sample 6\\
Sample 1 &Sample 2 &Sample 3 &Sample 4 &Sample 5&Sample 6\\
Sample 1 &Sample 2 &Sample 3 &Sample 4 &Sample 5&Sample 6\\
\hhline{>{\arrayrulecolor{blue}\hspace*{10pt}}=>{\arrayrulecolor{red}\hspace*{10pt}}>{\arrayrulecolor{yellow}\hspace*{30pt}}=>{\arrayrulecolor{green}\hspace*{10pt}}===}
Sample 1 &Sample 2 &Sample 3 &Sample 4 &Sample 5&Sample 6\\
\arrayrulecolor{red}\hline
\end{tabular}
\end{document}