[Tex/LaTex] How to make horizontal lines thicker

rulessectioningtitlesec

I am customizing the section module following the tutorial here
http://blog.scribtex.com/how-to-write-a-latex-class-file-and-design-yo

How do I make the

  [\titlerule]                 % Inserts a horizontal line after the heading

thicker?

Best Answer

Use the optional argument of \titlerule to specify the rule height. Note that you'll have to wrap \titlerule[<height>] into braces if you're using it in the optional argument of \titleformat.

\documentclass{article}

\usepackage{titlesec}

\titleformat{\section}
    {\Large\scshape\raggedright}{}{0em}{}[{\titlerule[2pt]}]

\begin{document}

\section{foo}

\end{document}

enter image description here