Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to ask how can I add the paragraph symbol § so that it will be displayed as below:

§4 First section

§5 Second section

By default it is generated as below when a \section command is used :

4 First section

5 Second section

Edit: Code below

\renewcommand{\thesection}{\S\arabic{section}}

is one solution but adds § also with \subsection command. Is there another solution?

share|improve this question
    
Have you seen question how-can-i-number-paragraphs... and my answer there? –  Kurt Aug 10 '13 at 19:53
1  
No, I don't. But I see you solve my problem. Question is replaced/duplicated. I use just \renewcommand{\thesection}{\S\arabic{section}} –  Mateusz Czerwiński Aug 10 '13 at 19:57
2  
Pay attention that it also adds the same symbol in \subsections. –  karlkoeller Aug 10 '13 at 19:59
    
You can also see Changing the section format for a package free version. –  egreg Aug 10 '13 at 20:29
add comment

1 Answer

up vote 5 down vote accepted

Perhaps the quickest way is to use the titlesec package:

\documentclass{article}
\usepackage{titlesec}

\titleformat{\section}
  {\normalfont\Large\bfseries}{\S\thesection}{1em}{}

\begin{document}

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

\end{document}

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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