I would like to (preferably without additional packages) be able to add a prefix before all section numbers, but not to subsection or subsubsection numbers. In other words, I want the section numbering to look like: "Prefix 1", "1.1", "1.2", "Prefix 2", "2.1", "2.2", etc.

It would be a nice bonus if I don't need to respecify all of the default settings for the section, and can just specify the prefix text.

2 Answers 2


The prefix can be added by redefining \thesection.

% \thesubsection might use \thesection, therefore it is also redefined

Then the prefix is also be present in references of the section.

  • 1
    I had tried using \thesection before (unsucessfully), but didn't think to redefine \thesubsection. I guess there isn't a good way to do this without redefining (and thus requiring knowledge of the previous \thesubsection definition) ?
    – Mark
    Aug 23, 2012 at 18:44
  • 2
    Without assumptions on the definition text of \thesubsection there is not an easy way. Also other counters could be defined using \thesection, but this is usually not done. Aug 23, 2012 at 18:55
  • Sadly, this solution does not work well with \tableofcontents. Here, "Prefix X" is usually too large, so that the end of this string overlaps with the beginning of the actual heading. I have seen a fix for this, but I simply cannot find it anmore... any ideas?
    – Prof.Chaos
    Jul 30, 2018 at 18:10

I'll add a second answer, which shows how to do it to make the prefix show in Section title, but not in the references. Just put this code into the document header. We suppose titlesec or other similar packages are not in use, since titlesec has its own standard way how to achieve this:

\def\section{\@startsection{section}{1}{\z@ }%
  {-3.5ex\@plus -1ex\@minus -.2ex}{2.3ex \@plus .2ex}%
  {\noindent\normalfont \Large \bfseries Prefix\ }%

You must log in to answer this question.

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