[Tex/LaTex] Varying thickness hrule

linerulessectioning

I saw this format in a book and was wondering how to create the varying thickness horizontal rules above the section headers. I am assuming an MWE isn't necessary here. I got some idea here but I think there's probably something more simple than TikZ for this.
enter image description here

Best Answer

That doesn't look like a varying width rule, just two rules:

enter image description here

\documentclass{article}

\begin{document}

\noindent\rule{\textwidth}{.5pt}

\nointerlineskip
\noindent\rule{3cm}{5pt}
\end{document}

For example using the section format mentioned in comments:

\documentclass{article}
\usepackage{titlesec}

\titleformat{\section}
  {\normalfont\Large\bfseries}{\thesection}{1em}{}[{\titlerule}]

\renewcommand\titlerule{%
\parbox{\textwidth}{%
\noindent\rule{\textwidth}{.5pt}%
\par
\nointerlineskip
\noindent\rule{3cm}{5pt}\par}}
\begin{document}

\section{Test Section}

\end{document}
Related Question