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.

Asked
Active
Viewed 2,902 times
2
Zack Fair
- 471
1 Answers
7
That doesn't look like a varying width rule, just two rules:
\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}
David Carlisle
- 757,742

– Zack Fair May 22 '17 at 22:20\titleformat{\section}{\LARGE\sffamily\slshape}{\noindent\rule{\textwidth}{.5pt}\nointerlineskip\noindent\rule{3cm}{5pt}\thesection}{1em}{}