In some papers and books you see that author uses §1.3 instead of section 1.3. How § sign can be added before section (or part, chapter, ...) number automatically? Please mention any useful tip about this style.

see also: Fancy cross-referencing


4 Answers 4


You could use the cleveref package and redefine \crefname{section}:






Some text.


As explained in \cref{sec:foo}~\dots


enter image description here

  • 20
    +1 you can avoid inputenc by using \S
    – cmhughes
    Commented Jun 15, 2012 at 3:59
  • 3
    @lockstep Little late to the party here, but can the space after § be removed? Commented Feb 22, 2013 at 17:12
  • 8
    @jstephenson Use \crefformat{section}{§#2#1#3}.
    – lockstep
    Commented Feb 24, 2013 at 11:42

hyperref provides \autoref{<label>} that checks the counter used in the reference and sets a label with a prepended \<counter>autorefname. Here's a small example:

enter image description here

\usepackage{hyperref}% http://ctan.org/pkg/hyperref
\section{A section}
\section{Another section}\label{another-section}
  • 10
    What I have done is the past is also redefined \subsectionautorefname and \subsubsectionautorefname to be the same as \sectionautorefname so that you can get "See § 2.1" or "See § 3.2.1". If one also uses autopageref, one can also redefine \pageautorefname to "p." to get "See § 3.2 on p. 4"
    – ArTourter
    Commented Jun 14, 2012 at 18:39
  • 3
    To avoid the space, use: \def\Snospace~{\S{}}, then \renewcommand*\sectionautorefname{\Snospace} instead. ``` Commented Jul 27, 2020 at 19:02

Often forgotten is the macro \p@<counter>. If LaTeX generates a reference value, this is not just \the<counter> but \p@<counter>\the<counter>. If a new counter is defined, \p@<counter> is defined empty. But it can be redefined to add a prefix, for example. Thus there is no need for additional packages.




\section{Hello World}
\subsection{Subsection A}
\subsection{Subsection B}
\subsection{Subsection C}

See \ref{sec:C} inside \ref{sec:hello}.
  • 1
    Should that be \renewcommand*{\p@subsection}{\S\S\,} instead? Commented Aug 7, 2012 at 5:03
  • 4
    The double form of the section sign is used, if it refers to the plural form. Commented Aug 7, 2012 at 6:43

I spent a little time figuring the solution for me so I thought I'd share. In case, like me:

  • You don't want to use the package cleveref (cf lockstep's answer) because it is incompatible with the showonlyrefs option of the package mathtools
  • You would rather not do Heiko Oberdiek's solution because you'd like to maintain the distinction between \ref and \autoref
  • You like the hyperref package and Werner's solution but it does not work because you are using the package babel

Here is the fix, found here:


Here it is in a minimal working example:






Cf \autoref{sec:bar}.


enter image description here

  • Why does using babel prevent Werner's solution from working? Also what is the purpose of the % markers at the end of the two lines where you apply your solution? Commented Dec 14, 2017 at 15:57
  • @Anonymous % at the end of line is for Tex to ignore the newline when {...} spans multiple lines. I'm not too clear about the mechanics, but it does solve errors. Commented Mar 12, 2018 at 13:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .