[Tex/LaTex] the thickness of \hrulefill

rules

This seems like a simple question …

I know from this question that \hrule and presumably \hrulefill have a thickness of 0.4pt. I think \hrule is a primitive, so does that mean that you cannot change the thickness of \hrulefill?

Best Answer

The default height for \hrule is 0.4pt (not a parameter whose default value is 0.4pt) so you are correct that it may not be changed via setting a parameter. However \hrulefill is only a macro so you can change it if you wish.

It is defined by

\def\hrulefill{\leavevmode\leaders\hrule\hfill\kern\z@}

so

\def\hrulefill{\leavevmode\leaders\hrule height 2pt\hfill\kern\z@}

would make it thicker