How can I change concrete \hline
width? Maybe does anything exist like \hline[2mm]
?
PS: \setlength{\arrayrulewidth}{2mm}
is inadequate in my situation because it changes all lines width in a table.
A small 'showcase' of the booktabs
rule width facilities.
In addition, the booktabs
package allows the change of the separation of rules with respect to the cells. For this, I refer to the manual.
\documentclass{article}
\usepackage{booktabs}
\usepackage{blindtext}
\begin{document}
\begin{center}
\begin{tabular}{p{12cm}}
\toprule[2mm]
\blindtext \tabularnewline
\midrule[5mm]
\blindtext \tabularnewline
\bottomrule[10mm]
\end{tabular}
\end{center}
\end{document}
without booktabs you can do
....\\
\noalign{
\global\dimen1\arrayrulewidth
\global\arrayrulewidth5pt
}\hline
\noalign{
\global\arrayrulewidth\dimen1
}
If you want to use vertical rules (not recommended in general), booktabs
is not compatible. But you can do that:
boldline
package, from the shipunov
bundle which defines a \hlineB{num}
, a \clineB{c1-c2}{num}
commands, and a V{num}
intercolumn specifier for vertical rules. Num
results in a num × \arrayrulewidth
.makecell
package, which has a \Xhline{length}
and a \Xcline{c1-c2}{length}
commands. Demo:
\documentclass{article}
\usepackage{array, makecell}
\usepackage{boldline}
\usepackage[x11names, table]{xcolor}
\usepackage{colortbl}
\begin{document}
\begin{center}
\renewcommand\arraystretch{1.5}
\begin{tabular}{V{2.5}c|c|cV{1.6}}
\hlineB{3}
Fiddle & Dee & Dee \\
\hlineB{2}
\end{tabular}
\vskip 3ex
\begin{tabular}{!{\vrule width2pt}c|c|c!{\vrule width2pt}}
\Xhline{3pt}
Fiddle & Dee & Dee \\
\Xhline{2pt}
\end{tabular}
\end{center}
\end{document}
makecell
), but it didn't work. A solution is to use the \specialrule
command from booktabs
, for which you can remove the padding around rules, and which obeys thearrayrulecolor
command.
booktabs
package and its\toprule[2mm]
or\midrule[2mm]
or\bottomrule[2mm]
commands instead of\hline
, depending on the position of the\hline