I am trying to add line after every section, at present I am adding it after every section, how do I add this once so that I don't have to explicitly add it every time. The code I used is:

\section*{$21^{st}$ March 2015}
\noindent\textcolor{red}{\rule{\textwidth}{1mm}} \\ \\

Such changes are best done with the titlesec package. With a standard documentclass you can write:


since according the documentation of titlesec


provides the standard section title format, and we just add the rule in the final optional argument for material after the title.

Sample output





\section*{21\textsuperscript{st} March 2015}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.