0
  • How to reduce specific horizontal rule length in the second column using hhline package?
  • Yellow line in the second column, left side rule width need to reduce.

\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}

enter image description here

  • Any suggestion, please advise? – Rajesh N Oct 21 at 6:34
  • Don't use hhline for this. It not support what you try to do. Since context of your table is unknown, it is difficult to give any further advice. – Zarko Oct 21 at 7:33
  • Okay, Thanks for your support. – Rajesh N Oct 21 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.