Which packages I should use for this table

tables

How I can add a table with this style. I take the example from here

enter image description here

I have the code but without any further instructions which packages I should import.

\colorlet{grayline}{gray!70}
\definecolor{blueline}{rgb}{0,0.27,0.55}
\begin{table}
\tablestyle
% Overwriting style, instead of defining a new one
\renewcommand{\tbegin}{\coloredhline{blueline}}
\renewcommand{\tbody}{\coloredhline{blueline}}
\renewcommand{\tend}{\coloredhline{blueline}}
\begin{tabularx}{0.8\textwidth}{%
l!{\coloredvline{grayline}}
CC!{\coloredvline{grayline}}
CC!{\coloredvline{grayline}}
C
}
\theadstart
\thead header &
\multicolumn{2}{>{\columncolor{\tablecolor{head}}\thead}
c!{\coloredvline{grayline}}}{header} &
\multicolumn{2}{>{\columncolor{\tablecolor{head}}\thead}
c!{\coloredvline{grayline}}}{header} &
\multicolumn{1}{>{\columncolor{\tablecolor{head}}\thead}c}
{header}
%
\tabularnewline
\tbody
%
description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
\tend
\end{tabularx}
\end{table}

Best Answer

You need to load only

\usepackage{tablestyles} 
\usepackage{tabularx}

and make some corrections of the code. (The example in your link does not work correctly.).

c

This is the complete code. (xcolor is loaded by tablestyles}

\documentclass[12pt,a4paper]{article}

\usepackage{tablestyles} % <<<<<<<<<<<<<<<<<<<
\usepackage{tabularx} %<<<<<<<<<<<<<<<<<<<<<

\begin{document}

\colorlet{grayline}{gray!70}
\definecolor{blueline}{rgb}{0,0.27,0.55}
\setuptablecolor{head}{gray!75}
 
\begin{table}
\tablestyle
\renewcommand{\tlinetop}{\coloredhline{blueline}}
\renewcommand{\tlinemid}{\coloredhline{blueline}}
\renewcommand{\tlinebottom}{\coloredhline{blueline}}
    \begin{tabular}{l!{\coloredvline{grayline}}C{0.15\textwidth}
                    C{0.15\textwidth}!{\coloredvline{grayline}}C{0.15\textwidth}
                    C{0.15\textwidth}!{\coloredvline{grayline}}C{0.15\textwidth}
            }
        \theadstart%        
        \thead header &
        \multicolumn{2}{>{\columncolor{\tablecolor{head}}\thead}
        c!{\coloredvline{grayline}}}{header} &
        \multicolumn{2}{>{\columncolor{\tablecolor{head}}\thead}
        c!{\coloredvline{grayline}}}{header} &
        \multicolumn{1}{>{\columncolor{\tablecolor{head}}\thead}c}
        {header}
        \tabularnewline
        \tbody
        description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
        description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
        description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
        description & 0,3 & 0,35 & 0,5 & 0,65 & 0,80 \\
        \tend
    \end{tabular}
\caption{Table with colored vertical and horizontal lines}
\end{table}
    
\end{document}
Related Question