I know that this question has been answered before for section and chapter titles, but I cannot seem to apply it to subsection titles. I would like to globally change the format of subsection titles to the one presented in the MWE:
\documentclass[]{article}
\usepackage[T1]{fontenc}
\newcommand\ruleafter{\vspace*{-.5cm}\noindent\rule{\textwidth}{1pt}\vspace*{-.2cm}}
%opening
\title{}
\author{}
\begin{document}
\subsection{\textsc{Subsection title}}\ruleafter
\end{document}
I have tried using titlesec
, but without success. Any suggestions? Thanks in advance!
PS: The questions considering the section and the chapter format, respectively:
How can I make a bold horizontal rule under each section title?