\midrule dashed and colored in booktabs -- two kinds of midrules in one booktab
You can use the tabu
package instead:
\documentclass{beamer}
\usepackage{tabu}
\begin{document}
\begin{frame}
\begin{table}
\tabulinesep =_4pt^4pt
\begin{tabu}to \textwidth{@{}cX[m]ccc@{}}
\tabucline[1pt blue!40 off 0pt]{-}
\multicolumn{2}{@{}l}{procesy} & Min & Max &Dalkia\\
\tabucline[0.7pt blue!40 off 0pt]{-}
& Junior & 1 700 & 2 800 & 3 200\\
\tabucline[0.4pt blue!40 off 2pt]{-}
& Senior & & ? &\\
\tabucline[0.4pt blue!40 off 2pt]{-}
& Specjalist & & ? &\\
\tabucline[0.4pt blue!40 off 2pt]{-}
& Team Leader & & ? &\\
\tabucline[1pt blue!40 off 0pt]{-}
\end{tabu}
\caption{1. Wynagrodzenia: Procesy HR}
\label{tabela1}
\end{table}
\end{frame}
\end{document}
Here is an option that compares the tabu
output of Gonzalo's answer with that of booktabs
. It's workable in comparison with tabu
, but it's not always pretty.
\documentclass{article}
\usepackage{tabu}% http://ctan.org/pkg/tabu
\usepackage{xcolor}% http://ctan.org/pkg/xcolor
\usepackage{tabularx}% http://ctan.org/pkg/tabularx
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\makeatletter
\newcommand{\dashrule}[1][black]{%
\color{#1}\rule[\dimexpr.5ex-.2pt]{4pt}{.4pt}\xleaders\hbox{\rule{4pt}{0pt}\rule[\dimexpr.5ex-.2pt]{4pt}{.4pt}}\hfill\kern0pt%
}
\newcommand{\rulecolor}[1]{%
\def\CT@arc@{\color{#1}}%
}
\makeatother
\begin{document}
\begin{table}[t]
\tabulinesep =_4pt^4pt
\begin{tabu}to \textwidth{@{}cX[m]X[c]X[c]X[c]@{}}
\tabucline[1pt blue!40 off 0pt]{-}
\multicolumn{2}{@{}l}{procesy} & Min & Max &Dalkia\\
\tabucline[0.7pt blue!40 off 0pt]{-}
& Junior & 1 700 & 2 800 & 3 200\\
\tabucline[0.4pt blue!40 off 2pt]{-}
& Senior & & ? &\\
\tabucline[0.4pt blue!40 off 2pt]{-}
& Specjalist & & ? &\\
\tabucline[0.4pt blue!40 off 2pt]{-}
& Team Leader & & ? &\\
\tabucline[1pt blue!40 off 0pt]{-}
\end{tabu}
\bigskip
\rulecolor{blue!40}
\begin{tabularx}{\linewidth}{X>{\centering}X>{\centering}X>{\centering\arraybackslash}X@{}}
\toprule
procesy & Min & Max & Delta \\
\midrule
Junior & 1\,700 & 2\,800 & 3\,200 \\[-\jot]
\multicolumn{4}{@{}c@{}}{\makebox[\linewidth]{\dashrule[blue!40]}} \\[-\jot]
Senior & & ? &\\
\multicolumn{4}{@{}c@{}}{\makebox[\linewidth]{\dashrule[blue!40]}} \\[-\jot]
Specjalist & & ? &\\
\multicolumn{4}{@{}c@{}}{\makebox[\linewidth]{\dashrule[blue!40]}} \\[-\jot]
Team Leader & & ? &\\
\bottomrule
\end{tabularx}
\caption{1. Wynagrodzenia: Procesy HR}
\end{table}
\end{document}
The use of tabularx
makes it convenient to specify the tabular
width. Rule colour is specified using \rulecolor{<color>}
and that of the dashed rule is done using \dashrule[<color>]
.