Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How can I produce \noalign{\hrule height 1pt} only through a certain number of columns just like with \cline{n-m} (or basically \cline with adjustable thickness)?

The objective.

Fig. 1: The approximate objective (digitally manipulated in a graphics editing program).

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You can define a new command which changes the value of \arrayrulewidth, draws the \cline and then restores \arrayrulewidth to its original value:



  a & b & c \\\Cline{2pt}{2-3}
  d & e & f \\\Cline{3pt}{1-2}


enter image description here

The first argument of \Cline controls the "thickness" of the rule.

EDIT: The \cmidrule command provided by the booktabs package admits an optional argument controlling the thickness of the rule, so you can say:



  a & b & c \\ \cmidrule[2pt]{2-3}
  d & e & f \\ \cmidrule[3pt]{1-2}

share|improve this answer
Splendid! Thank you. –  Harold Cavendish Jul 31 '11 at 13:55

You may have a look at the tabu package. It supports optional parameters for the width of the rules in a table.



  \begin{tabu} to \textwidth {|[1pt] c|[1pt] c|[1pt] p{4cm} | X |[1pt]}\tabucline[1pt]{-}
    \multirow{4}{*}[-5ex]{\rotatebox{90}{Ten}} & \multirow{2}{*}[-2ex]{\rotatebox{90}{Eight}} & \rb{One} & \rb{Two} \\ \tabucline{3-4}
    & & \rb{Three} & \rb{Four} \\[2ex] \tabucline[1pt]{2-4}
    & \multirow{2}{*}[-2ex]{\rotatebox{90}{Nine}} & \rb{Five} & \rb{Six} \\ \tabucline{3-4}
    & &\multicolumn{2}{l|[1pt]}{\rb{Seven}} \\[4ex] \tabucline[1pt]{-}
share|improve this answer
I am indeed impressed by your solution of almost all issues I currently have. It is unfortunate that I did not come across the tabu package before, it looks very promising. There is just one more issue: If I want some of the rules thicker (as in your code), there are gaps between them. Do you know how to make them join seamlessly, please? –  Harold Cavendish Jul 31 '11 at 15:38
I see what you mean. And I'm afraid that this is an issue that is better addressed to the package maintainer. –  Thorsten Donig Jul 31 '11 at 15:42
I have just accidentally solved it by simply replacing \tabucline with \cline and \Cline defined by @Gonzalo Medina hereinbefore. Thank you very much! –  Harold Cavendish Jul 31 '11 at 16:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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