[texhax] \bcline

Heiko Oberdiek heiko.oberdiek at googlemail.com
Sat Oct 15 18:47:52 CEST 2011


On Sat, Oct 15, 2011 at 05:21:10PM +0100, Dr A K Hannaby wrote:

> Anyone know how to introduce line thickness into the following \bcline.
> 
> \newcommand\bcline[1]
> 
>     {\arrayrulecolor{DarkRed}\cline{#1}\arrayrulecolor{DarkRed}}
> 
> /
> 
> Call \bcline{1-6} to run across first 6 cells in table.

\documentclass[12pt]{article}
\usepackage{colortbl}

\newdimen\SavedArrayRuleWidth
\newcommand*{\bcline}[1]{%
  \noalign{%
    \global\SavedArrayRuleWidth\arrayrulewidth
    \global\arrayrulewidth=1mm\relax
  }%
  \arrayrulecolor{red}%
  \cline{#1}%
  \noalign{%
    \global\arrayrulewidth\SavedArrayRuleWidth
  }%
}

\begin{document}
\Huge
\begin{tabular}{ll}
\hline   
abc&def\\
\bcline{1-1}%
abc&def\\
\end{tabular} 
\end{document}

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list