1

Good day! Here my requirement is table columns in different color with respective span rule. When we using \cline{} it has disappeared and overridden by next row color. Please suggest me how to solve this.

In Red color marked is the rule missed area.Span rule table

MWE:

\documentclass{book} 
%\usepackage{pdfx}
\usepackage{colortbl,multirow} 
\begin{document}
\chapter{Sample title} 
\section{Head one First}
Between 200BC and 100BC, during $\mathcal{A}$ the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while
discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.

\begin{tabular}{|l|l|l|}
\hline
\textbf{Discussing quadratic} & \textbf{Modern sense} &\\
\hline
\cellcolor{green}Han Dynasty  & \cellcolor{green}Chinese markup & \cellcolor{yellow} \\
\cline{1-2}
\cellcolor{green}Han Dynasty  & \cellcolor{green}Chinese markup &\cellcolor{yellow}Poor ratio\\
\cline{1-2}
\cellcolor{green}Han Dynasty  & \cellcolor{green}Chinese markup &\cellcolor{yellow}\\
\hline
\end{tabular}


\section{Head one Second}
Between 200BC and 100BC, during the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.

\end{document} 
3

The problem with \cline and coloured cells is known. A work-around consists in using \hhline which works well with colour: set the colour of the last part of the hhline to yellow, and restore it to black afterwards.

\documentclass{book}
\usepackage{colortbl,multirow, hhline}

\begin{document}

\chapter{Sample title}

\section{Head one First}
Between 200BC and 100BC, during $\mathcal{A}$ the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while
discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.
\begin{center}
\aboverulesep = 0pt
\belowrulesep = 0pt
\begin{tabular}{|l|l|l|}
\hline
\textbf{Discussing quadratic} & \textbf{Modern sense} &\\
\hline
\cellcolor{green}Han Dynasty & \cellcolor{green}Chinese markup & \cellcolor{yellow} \\
\hhline{-->{\arrayrulecolor{yellow}}->{\arrayrulecolor{black}}|}
\cellcolor{green}Han Dynasty & \cellcolor{green}Chinese markup &\cellcolor{yellow}Poor ratio\\
\hhline{-->{\arrayrulecolor{yellow}}->{\arrayrulecolor{black}}|}
\cellcolor{green}Han Dynasty & \cellcolor{green}Chinese markup &\cellcolor{yellow}\\
\hline
\end{tabular}
\end{center}

\section{Head one Second}
Between 200BC and 100BC, during the Han Dynasty, the Chinese used matrix-type methods with the text \textit{Nine chapters on the mathematical art}. There was further development, but it was not until 1683 when the idea of a determinant appeared in Japan when Seki wrote \textit{Method of solving the dissimulated problems}. This used matrix methods in tables in the same way as the earlier work of the Chinese. Ten years later the determinant first appeared in Europe in the work of Leibniz. The word determinant was first introduced by Gauss in 1801 while discussing quadratic forms, but Cauchy in 1812 used determinant in the modern sense.

\end{document} 

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.