[Tex/LaTex] Add section symbol to section


I would like to know how can I add the section symbol §, so that it will be displayed as follows.

§4 First section

§5 Second section

By default, it is generated as follows when a \section command is used.

4 First section

5 Second section


This is one solution:


However, it adds § also with \subsection command. Is there another solution?

Best Answer

Perhaps the quickest way is to use the titlesec package:




\section{Test section}
\subsection{Test subsection}
\section*{An unnumbered test section}
\section{Another test section}
\subsection{Another test subsection}


enter image description here

Related Question